2001

In [1]:
import pandas as pd
import numpy as np
In [2]:
%matplotlib inline
from matplotlib import pyplot as plt 
In [3]:
suicide_x = pd.read_csv(r"D:\Downloads\suicides_in_india.csv")
In [4]:
suicide_df= pd.DataFrame(suicide_x)
suicide_df
Out[4]:
State Year Type Gender Age_group Total
0 A & N ISLANDS 2001 Cancer Male 15-29 0
1 A & N ISLANDS 2001 Divorce Male 60+ 0
2 A & N ISLANDS 2001 Dowry Dispute Female 60+ 0
3 A & N ISLANDS 2001 Ideological Causes/Hero Worshipping Female 60+ 0
4 A & N ISLANDS 2001 Illness (Aids/STD) Female 0-14 0
... ... ... ... ... ... ...
236578 WEST BENGAL 2012 Professional Activity Male 60+ 0
236579 WEST BENGAL 2012 Self-employed (Business activity) Male 0-14 0
236580 WEST BENGAL 2012 Service (Government) Male 15-29 0
236581 WEST BENGAL 2012 Service (Government) Male 60+ 0
236582 WEST BENGAL 2012 Never Married Male 0-100+ 2658

236583 rows × 6 columns

In [5]:
df_2001 = suicide_df.loc[(suicide_df["Year"]==2001)]

df_2001
Out[5]:
State Year Type Gender Age_group Total
0 A & N ISLANDS 2001 Cancer Male 15-29 0
1 A & N ISLANDS 2001 Divorce Male 60+ 0
2 A & N ISLANDS 2001 Dowry Dispute Female 60+ 0
3 A & N ISLANDS 2001 Ideological Causes/Hero Worshipping Female 60+ 0
4 A & N ISLANDS 2001 Illness (Aids/STD) Female 0-14 0
... ... ... ... ... ... ...
236377 WEST BENGAL 2001 By Overdose of sleeping pills Male 30-44 101
236378 WEST BENGAL 2001 By touching electric wires Female 0-14 8
236379 WEST BENGAL 2001 Public Sector Undertaking Male 45-59 137
236380 WEST BENGAL 2001 Retired Person Female 60+ 28
236381 WEST BENGAL 2001 Unemployed Female 30-44 110

19719 rows × 6 columns

In [6]:
t2001_dcount = df_2001.loc[:,"Total"]

s1_1 = np.sum(t2001_dcount)

s1_1
Out[6]:
542440
In [7]:
male_2001 = df_2001.loc[(df_2001["Gender"]=="Male")]

male_2001
Out[7]:
State Year Type Gender Age_group Total
0 A & N ISLANDS 2001 Cancer Male 15-29 0
1 A & N ISLANDS 2001 Divorce Male 60+ 0
5 A & N ISLANDS 2001 Paralysis Male 45-59 0
6 A & N ISLANDS 2001 Property Dispute Male 0-14 0
11 A & N ISLANDS 2001 By Machine Male 60+ 0
... ... ... ... ... ... ...
236372 WEST BENGAL 2001 By Consuming Insecticides Male 15-29 157
236373 WEST BENGAL 2001 By Jumping from (Building) Male 30-44 48
236374 WEST BENGAL 2001 By Jumping off Moving Vehicles/Trains Male 15-29 21
236377 WEST BENGAL 2001 By Overdose of sleeping pills Male 30-44 101
236379 WEST BENGAL 2001 Public Sector Undertaking Male 45-59 137

9872 rows × 6 columns

In [8]:
m2001_count = male_2001.loc[:,"Total"]
s1_2 = np.sum(m2001_count)

s1_2
Out[8]:
331563
In [9]:
female_2001 = df_2001.loc[(df_2001["Gender"]=="Female")]

female_2001
Out[9]:
State Year Type Gender Age_group Total
2 A & N ISLANDS 2001 Dowry Dispute Female 60+ 0
3 A & N ISLANDS 2001 Ideological Causes/Hero Worshipping Female 60+ 0
4 A & N ISLANDS 2001 Illness (Aids/STD) Female 0-14 0
7 A & N ISLANDS 2001 Suspected/Illicit Relation Female 15-29 0
8 A & N ISLANDS 2001 By Consuming Insecticides Female 0-14 0
... ... ... ... ... ... ...
236375 WEST BENGAL 2001 Others Female 15-29 195
236376 WEST BENGAL 2001 Others Female 45-59 284
236378 WEST BENGAL 2001 By touching electric wires Female 0-14 8
236380 WEST BENGAL 2001 Retired Person Female 60+ 28
236381 WEST BENGAL 2001 Unemployed Female 30-44 110

9847 rows × 6 columns

In [10]:
fm2001_count = female_2001.loc[:,"Total"]
s1_3 = np.sum(fm2001_count)
s1_3
Out[10]:
210877
In [11]:
df_age_d014_2001 = df_2001.loc[(df_2001["Age_group"]=="0-14")]

df_age_d014_2001
Out[11]:
State Year Type Gender Age_group Total
4 A & N ISLANDS 2001 Illness (Aids/STD) Female 0-14 0
6 A & N ISLANDS 2001 Property Dispute Male 0-14 0
8 A & N ISLANDS 2001 By Consuming Insecticides Female 0-14 0
15 A & N ISLANDS 2001 By touching electric wires Male 0-14 0
17 A & N ISLANDS 2001 Others Male 0-14 0
... ... ... ... ... ... ...
236154 UTTARAKHAND 2001 Public Sector Undertaking Female 0-14 0
236155 UTTARAKHAND 2001 Self-employed (Business activity) Female 0-14 0
236363 WEST BENGAL 2001 Family Problems Female 0-14 3
236367 WEST BENGAL 2001 Insanity/Mental Illness Male 0-14 8
236378 WEST BENGAL 2001 By touching electric wires Female 0-14 8

3749 rows × 6 columns

In [12]:
t_014_2001 = df_age_d014_2001.loc[:,"Total"]

s1_4 = np.sum(t_014_2001)
s1_4
Out[12]:
9010
In [13]:
df_age_d1529_2001 = df_2001.loc[(df_2001["Age_group"]=="15-29")]

df_age_d1529_2001
Out[13]:
State Year Type Gender Age_group Total
0 A & N ISLANDS 2001 Cancer Male 15-29 0
7 A & N ISLANDS 2001 Suspected/Illicit Relation Female 15-29 0
19 A & N ISLANDS 2001 Self-employed (Business activity) Female 15-29 0
84 A & N ISLANDS 2001 Illegitimate Pregnancy Male 15-29 0
87 A & N ISLANDS 2001 Others Male 15-29 4
... ... ... ... ... ... ...
236362 WEST BENGAL 2001 Fall in Social Reputation Female 15-29 1
236369 WEST BENGAL 2001 Other Prolonged Illness Female 15-29 37
236372 WEST BENGAL 2001 By Consuming Insecticides Male 15-29 157
236374 WEST BENGAL 2001 By Jumping off Moving Vehicles/Trains Male 15-29 21
236375 WEST BENGAL 2001 Others Female 15-29 195

3768 rows × 6 columns

In [14]:
t_1529_2001 = df_age_d1529_2001.loc[:,"Total"]

s1_5 = np.sum(t_1529_2001)

s1_5
Out[14]:
116655
In [15]:
df_age_d3044_2001 = df_2001.loc[(df_2001["Age_group"]=="30-44")]

df_age_d3044_2001
Out[15]:
State Year Type Gender Age_group Total
9 A & N ISLANDS 2001 By Fire/Self Immolation Female 30-44 1
12 A & N ISLANDS 2001 Others Female 30-44 0
18 A & N ISLANDS 2001 Public Sector Undertaking Female 30-44 0
82 A & N ISLANDS 2001 Failure in Examination Male 30-44 0
83 A & N ISLANDS 2001 Fall in Social Reputation Male 30-44 0
... ... ... ... ... ... ...
236370 WEST BENGAL 2001 Poverty Female 30-44 5
236371 WEST BENGAL 2001 Professional/Career Problem Female 30-44 2
236373 WEST BENGAL 2001 By Jumping from (Building) Male 30-44 48
236377 WEST BENGAL 2001 By Overdose of sleeping pills Male 30-44 101
236381 WEST BENGAL 2001 Unemployed Female 30-44 110

3767 rows × 6 columns

In [16]:
t_3044_2001 = df_age_d3044_2001.loc[:,"Total"]

s1_6 = np.sum(t_3044_2001)
s1_6
Out[16]:
109344
In [17]:
df_age_d4559_2001 = df_2001.loc[(df_2001["Age_group"]=="45-59")]

df_age_d4559_2001
Out[17]:
State Year Type Gender Age_group Total
5 A & N ISLANDS 2001 Paralysis Male 45-59 0
10 A & N ISLANDS 2001 By Hanging Female 45-59 4
13 A & N ISLANDS 2001 By Overdose of sleeping pills Male 45-59 0
14 A & N ISLANDS 2001 By Self Infliction of injury Male 45-59 0
20 A & N ISLANDS 2001 Service (Government) Female 45-59 0
... ... ... ... ... ... ...
236144 UTTARAKHAND 2001 By Consuming Other Poison Female 45-59 4
236151 UTTARAKHAND 2001 By touching electric wires Female 45-59 0
236368 WEST BENGAL 2001 Love Affairs Female 45-59 0
236376 WEST BENGAL 2001 Others Female 45-59 284
236379 WEST BENGAL 2001 Public Sector Undertaking Male 45-59 137

3764 rows × 6 columns

In [18]:
t_4559_2001 = df_age_d4559_2001.loc[:,"Total"]

s1_7 = np.sum(t_4559_2001)

s1_7
Out[18]:
64737
In [19]:
df_age_d60_2001 = df_2001.loc[(df_2001["Age_group"]=="60+")]

df_age_d60_2001
Out[19]:
State Year Type Gender Age_group Total
1 A & N ISLANDS 2001 Divorce Male 60+ 0
2 A & N ISLANDS 2001 Dowry Dispute Female 60+ 0
3 A & N ISLANDS 2001 Ideological Causes/Hero Worshipping Female 60+ 0
11 A & N ISLANDS 2001 By Machine Male 60+ 0
16 A & N ISLANDS 2001 House Wife Male 60+ 0
... ... ... ... ... ... ...
236147 UTTARAKHAND 2001 By Fire-Arms Female 60+ 0
236148 UTTARAKHAND 2001 By Jumping off Moving Vehicles/Trains Male 60+ 0
236360 WEST BENGAL 2001 Cancer Male 60+ 26
236364 WEST BENGAL 2001 Illegitimate Pregnancy Male 60+ 0
236380 WEST BENGAL 2001 Retired Person Female 60+ 28

3761 rows × 6 columns

In [20]:
t_60_2001 = df_age_d60_2001.loc[:,"Total"]

s1_8 = np.sum(t_60_2001)
s1_8
Out[20]:
25682
In [21]:
df_age_d0100_2001 = df_2001.loc[(df_2001["Age_group"]=="0-100+")]

df_age_d0100_2001
Out[21]:
State Year Type Gender Age_group Total
259 A & N ISLANDS 2001 Widowed/Widower Male 0-100+ 0
334 A & N ISLANDS 2001 Married Female 0-100+ 38
335 A & N ISLANDS 2001 Seperated Female 0-100+ 0
336 A & N ISLANDS 2001 Widowed/Widower Female 0-100+ 0
408 A & N ISLANDS 2001 Diploma Female 0-100+ 0
... ... ... ... ... ... ...
235075 RAJASTHAN 2001 Diploma Female 0-100+ 6
235076 RAJASTHAN 2001 No Education Male 0-100+ 357
235286 SIKKIM 2001 Graduate Female 0-100+ 0
235939 UTTAR PRADESH 2001 No Education Male 0-100+ 359
236156 UTTARAKHAND 2001 Divorcee Male 0-100+ 0

910 rows × 6 columns

In [22]:
t_0100_2001 = df_age_d0100_2001.loc[:,"Total"]

s1_54 = np.sum(t_0100_2001)
s1_54
Out[22]:
217012
In [23]:
df_014m_2001 = df_age_d014_2001.loc[(df_age_d014_2001["Gender"]=="Male")]
df_014m_2001
Out[23]:
State Year Type Gender Age_group Total
6 A & N ISLANDS 2001 Property Dispute Male 0-14 0
15 A & N ISLANDS 2001 By touching electric wires Male 0-14 0
17 A & N ISLANDS 2001 Others Male 0-14 0
92 A & N ISLANDS 2001 Unemployment Male 0-14 0
96 A & N ISLANDS 2001 Student Male 0-14 1
... ... ... ... ... ... ...
236138 UTTARAKHAND 2001 Drug Abuse/Addiction Male 0-14 0
236140 UTTARAKHAND 2001 Not having Children(Barrenness/Impotency Male 0-14 0
236149 UTTARAKHAND 2001 By Machine Male 0-14 0
236152 UTTARAKHAND 2001 House Wife Male 0-14 0
236367 WEST BENGAL 2001 Insanity/Mental Illness Male 0-14 8

1875 rows × 6 columns

In [24]:
t_014m_2001 = df_014m_2001.loc[:,"Total"]

s1_9 = np.sum(t_014m_2001)
s1_9
Out[24]:
4488
In [25]:
df_014fm_2001 = df_age_d014_2001.loc[(df_age_d014_2001["Gender"]=="Female")]
df_014fm_2001
Out[25]:
State Year Type Gender Age_group Total
4 A & N ISLANDS 2001 Illness (Aids/STD) Female 0-14 0
8 A & N ISLANDS 2001 By Consuming Insecticides Female 0-14 0
80 A & N ISLANDS 2001 Bankruptcy or Sudden change in Economic Female 0-14 0
81 A & N ISLANDS 2001 Cancellation/Non-Settlement of Marriage Female 0-14 0
164 A & N ISLANDS 2001 Physical Abuse (Rape/Incest Etc.) Female 0-14 0
... ... ... ... ... ... ...
235734 TRIPURA 2001 By Jumping from (Building) Female 0-14 0
236154 UTTARAKHAND 2001 Public Sector Undertaking Female 0-14 0
236155 UTTARAKHAND 2001 Self-employed (Business activity) Female 0-14 0
236363 WEST BENGAL 2001 Family Problems Female 0-14 3
236378 WEST BENGAL 2001 By touching electric wires Female 0-14 8

1874 rows × 6 columns

In [26]:
t_014fm_2001 = df_014fm_2001.loc[:,"Total"]

s1_10 = np.sum(t_014fm_2001)
s1_10
Out[26]:
4522
In [27]:
df_1529m_2001 = df_age_d1529_2001.loc[(df_age_d1529_2001["Gender"]=="Male")]
df_1529m_2001
Out[27]:
State Year Type Gender Age_group Total
0 A & N ISLANDS 2001 Cancer Male 15-29 0
84 A & N ISLANDS 2001 Illegitimate Pregnancy Male 15-29 0
87 A & N ISLANDS 2001 Others Male 15-29 4
88 A & N ISLANDS 2001 Other Prolonged Illness Male 15-29 3
89 A & N ISLANDS 2001 Physical Abuse (Rape/Incest Etc.) Male 15-29 0
... ... ... ... ... ... ...
235941 UTTAR PRADESH 2001 Others Male 15-29 57
236139 UTTARAKHAND 2001 Ideological Causes/Hero Worshipping Male 15-29 7
236141 UTTARAKHAND 2001 Not having Children(Barrenness/Impotency Male 15-29 0
236372 WEST BENGAL 2001 By Consuming Insecticides Male 15-29 157
236374 WEST BENGAL 2001 By Jumping off Moving Vehicles/Trains Male 15-29 21

1886 rows × 6 columns

In [28]:
t_1529m_2001 = df_1529m_2001.loc[:,"Total"]

s1_11 = np.sum(t_1529m_2001)
s1_11
Out[28]:
59942
In [29]:
df_1529fm_2001 = df_age_d1529_2001.loc[(df_age_d1529_2001["Gender"]=="Female")]
df_1529fm_2001
Out[29]:
State Year Type Gender Age_group Total
7 A & N ISLANDS 2001 Suspected/Illicit Relation Female 15-29 0
19 A & N ISLANDS 2001 Self-employed (Business activity) Female 15-29 0
94 A & N ISLANDS 2001 By Overdose of sleeping pills Female 15-29 0
328 A & N ISLANDS 2001 Others Female 15-29 0
402 A & N ISLANDS 2001 Illegitimate Pregnancy Female 15-29 0
... ... ... ... ... ... ...
236146 UTTARAKHAND 2001 By Fire-Arms Female 15-29 0
236153 UTTARAKHAND 2001 Professional Activity Female 15-29 0
236362 WEST BENGAL 2001 Fall in Social Reputation Female 15-29 1
236369 WEST BENGAL 2001 Other Prolonged Illness Female 15-29 37
236375 WEST BENGAL 2001 Others Female 15-29 195

1882 rows × 6 columns

In [30]:
t_1529fm_2001 = df_1529fm_2001.loc[:,"Total"]

s1_12 = np.sum(t_1529fm_2001)
s1_12
Out[30]:
56713
In [31]:
df_3044m_2001 = df_age_d3044_2001.loc[(df_age_d3044_2001["Gender"]=="Male")]
df_3044m_2001
Out[31]:
State Year Type Gender Age_group Total
82 A & N ISLANDS 2001 Failure in Examination Male 30-44 0
83 A & N ISLANDS 2001 Fall in Social Reputation Male 30-44 0
85 A & N ISLANDS 2001 Insanity/Mental Illness Male 30-44 3
86 A & N ISLANDS 2001 Love Affairs Male 30-44 0
90 A & N ISLANDS 2001 Poverty Male 30-44 0
... ... ... ... ... ... ...
235726 TRIPURA 2001 Failure in Examination Male 30-44 7
235732 TRIPURA 2001 By Fire/Self Immolation Male 30-44 0
236361 WEST BENGAL 2001 Drug Abuse/Addiction Male 30-44 68
236373 WEST BENGAL 2001 By Jumping from (Building) Male 30-44 48
236377 WEST BENGAL 2001 By Overdose of sleeping pills Male 30-44 101

1886 rows × 6 columns

In [32]:
t_3044m_2001 = df_3044m_2001.loc[:,"Total"]

s1_13 = np.sum(t_3044m_2001)
s1_13
Out[32]:
70509
In [33]:
df_3044fm_2001 = df_age_d3044_2001.loc[(df_age_d3044_2001["Gender"]=="Female")]
df_3044fm_2001
Out[33]:
State Year Type Gender Age_group Total
9 A & N ISLANDS 2001 By Fire/Self Immolation Female 30-44 1
12 A & N ISLANDS 2001 Others Female 30-44 0
18 A & N ISLANDS 2001 Public Sector Undertaking Female 30-44 0
162 A & N ISLANDS 2001 Cancellation/Non-Settlement of Marriage Female 30-44 0
163 A & N ISLANDS 2001 Divorce Female 30-44 0
... ... ... ... ... ... ...
236365 WEST BENGAL 2001 Illness (Aids/STD) Female 30-44 49
236366 WEST BENGAL 2001 Insanity/Mental Illness Female 30-44 40
236370 WEST BENGAL 2001 Poverty Female 30-44 5
236371 WEST BENGAL 2001 Professional/Career Problem Female 30-44 2
236381 WEST BENGAL 2001 Unemployed Female 30-44 110

1881 rows × 6 columns

In [34]:
t_3044fm_2001 = df_3044fm_2001.loc[:,"Total"]

s1_14 = np.sum(t_3044fm_2001)
s1_14
Out[34]:
38835
In [35]:
df_4559m_2001 = df_age_d4559_2001.loc[(df_age_d4559_2001["Gender"]=="Male")]
df_4559m_2001
Out[35]:
State Year Type Gender Age_group Total
5 A & N ISLANDS 2001 Paralysis Male 45-59 0
13 A & N ISLANDS 2001 By Overdose of sleeping pills Male 45-59 0
14 A & N ISLANDS 2001 By Self Infliction of injury Male 45-59 0
93 A & N ISLANDS 2001 By Fire-Arms Male 45-59 0
167 A & N ISLANDS 2001 By Consuming Insecticides Male 45-59 0
... ... ... ... ... ... ...
235288 SIKKIM 2001 By Fire/Self Immolation Male 45-59 0
235520 TAMIL NADU 2001 Fall in Social Reputation Male 45-59 11
235529 TAMIL NADU 2001 By Fire-Arms Male 45-59 0
236143 UTTARAKHAND 2001 Unemployment Male 45-59 1
236379 WEST BENGAL 2001 Public Sector Undertaking Male 45-59 137

1886 rows × 6 columns

In [36]:
t_4559m_2001 = df_4559m_2001.loc[:,"Total"]

s1_15 = np.sum(t_4559m_2001)
s1_15
Out[36]:
46224
In [37]:
df_4559fm_2001 = df_age_d4559_2001.loc[(df_age_d4559_2001["Gender"]=="Female")]
df_4559fm_2001
Out[37]:
State Year Type Gender Age_group Total
10 A & N ISLANDS 2001 By Hanging Female 45-59 4
20 A & N ISLANDS 2001 Service (Government) Female 45-59 0
327 A & N ISLANDS 2001 By Jumping off Moving Vehicles/Trains Female 45-59 0
331 A & N ISLANDS 2001 Professional Activity Female 45-59 0
411 A & N ISLANDS 2001 By Self Infliction of injury Female 45-59 0
... ... ... ... ... ... ...
236142 UTTARAKHAND 2001 Suspected/Illicit Relation Female 45-59 0
236144 UTTARAKHAND 2001 By Consuming Other Poison Female 45-59 4
236151 UTTARAKHAND 2001 By touching electric wires Female 45-59 0
236368 WEST BENGAL 2001 Love Affairs Female 45-59 0
236376 WEST BENGAL 2001 Others Female 45-59 284

1878 rows × 6 columns

In [38]:
t_4559fm_2001 = df_4559fm_2001.loc[:,"Total"]

s1_16 = np.sum(t_4559fm_2001)
s1_16
Out[38]:
18513
In [39]:
df_60m_2001 = df_age_d60_2001.loc[(df_age_d60_2001["Gender"]=="Male")]
df_60m_2001
Out[39]:
State Year Type Gender Age_group Total
1 A & N ISLANDS 2001 Divorce Male 60+ 0
11 A & N ISLANDS 2001 By Machine Male 60+ 0
16 A & N ISLANDS 2001 House Wife Male 60+ 0
176 A & N ISLANDS 2001 Service (Private) Male 60+ 2
249 A & N ISLANDS 2001 Physical Abuse (Rape/Incest Etc.) Male 60+ 0
... ... ... ... ... ... ...
235285 SIKKIM 2001 Paralysis Male 60+ 0
235521 TAMIL NADU 2001 Illness (Aids/STD) Male 60+ 1
236148 UTTARAKHAND 2001 By Jumping off Moving Vehicles/Trains Male 60+ 0
236360 WEST BENGAL 2001 Cancer Male 60+ 26
236364 WEST BENGAL 2001 Illegitimate Pregnancy Male 60+ 0

1884 rows × 6 columns

In [40]:
t_60m_2001 = df_60m_2001.loc[:,"Total"]

s1_17 = np.sum(t_60m_2001)
s1_17
Out[40]:
17772
In [41]:
df_60fm_2001 = df_age_d60_2001.loc[(df_age_d60_2001["Gender"]=="Female")]
df_60fm_2001
Out[41]:
State Year Type Gender Age_group Total
2 A & N ISLANDS 2001 Dowry Dispute Female 60+ 0
3 A & N ISLANDS 2001 Ideological Causes/Hero Worshipping Female 60+ 0
175 A & N ISLANDS 2001 Public Sector Undertaking Female 60+ 0
238 A & N ISLANDS 2001 Bankruptcy or Sudden change in Economic Female 60+ 0
240 A & N ISLANDS 2001 Cancellation/Non-Settlement of Marriage Female 60+ 0
... ... ... ... ... ... ...
235728 TRIPURA 2001 Others Female 60+ 7
235933 UTTAR PRADESH 2001 Dowry Dispute Female 60+ 0
235938 UTTAR PRADESH 2001 Poverty Female 60+ 1
236147 UTTARAKHAND 2001 By Fire-Arms Female 60+ 0
236380 WEST BENGAL 2001 Retired Person Female 60+ 28

1877 rows × 6 columns

In [42]:
t_60fm_2001 = df_60fm_2001.loc[:,"Total"]

s1_18 = np.sum(t_60fm_2001)
s1_18
Out[42]:
7910
In [43]:
df_0100fm_2001 = df_age_d0100_2001.loc[(df_age_d0100_2001["Gender"]=="Female")]
df_0100fm_2001
Out[43]:
State Year Type Gender Age_group Total
334 A & N ISLANDS 2001 Married Female 0-100+ 38
335 A & N ISLANDS 2001 Seperated Female 0-100+ 0
336 A & N ISLANDS 2001 Widowed/Widower Female 0-100+ 0
408 A & N ISLANDS 2001 Diploma Female 0-100+ 0
566 A & N ISLANDS 2001 No Education Female 0-100+ 4
... ... ... ... ... ... ...
232767 KERALA 2001 Post Graduate and Above Female 0-100+ 23
234283 NAGALAND 2001 Never Married Female 0-100+ 5
234671 PUDUCHERRY 2001 Graduate Female 0-100+ 5
235075 RAJASTHAN 2001 Diploma Female 0-100+ 6
235286 SIKKIM 2001 Graduate Female 0-100+ 0

455 rows × 6 columns

In [44]:
t_0100fm_2001 = df_0100fm_2001.loc[:,"Total"]

s1_55 = np.sum(t_0100fm_2001)
s1_55
Out[44]:
84384
In [45]:
df_0100m_2001 = df_age_d0100_2001.loc[(df_age_d0100_2001["Gender"]=="Male")]
df_0100m_2001
Out[45]:
State Year Type Gender Age_group Total
259 A & N ISLANDS 2001 Widowed/Widower Male 0-100+ 0
740 A & N ISLANDS 2001 Seperated Male 0-100+ 0
808 A & N ISLANDS 2001 Matriculate/Secondary Male 0-100+ 10
1044 A & N ISLANDS 2001 Post Graduate and Above Male 0-100+ 0
1219 A & N ISLANDS 2001 Graduate Male 0-100+ 1
... ... ... ... ... ... ...
234466 ODISHA 2001 Married Male 0-100+ 1294
234467 ODISHA 2001 Seperated Male 0-100+ 107
235076 RAJASTHAN 2001 No Education Male 0-100+ 357
235939 UTTAR PRADESH 2001 No Education Male 0-100+ 359
236156 UTTARAKHAND 2001 Divorcee Male 0-100+ 0

455 rows × 6 columns

In [46]:
t_0100m_2001 = df_0100m_2001.loc[:,"Total"]

s1_56 = np.sum(t_0100m_2001)
s1_56
Out[46]:
132628
In [47]:
df_st_AN_2001 = df_2001.loc[(df_2001["State"]=="A & N ISLANDS")]

df_st_AN_2001
Out[47]:
State Year Type Gender Age_group Total
0 A & N ISLANDS 2001 Cancer Male 15-29 0
1 A & N ISLANDS 2001 Divorce Male 60+ 0
2 A & N ISLANDS 2001 Dowry Dispute Female 60+ 0
3 A & N ISLANDS 2001 Ideological Causes/Hero Worshipping Female 60+ 0
4 A & N ISLANDS 2001 Illness (Aids/STD) Female 0-14 0
... ... ... ... ... ... ...
5119 A & N ISLANDS 2001 Others Male 60+ 1
5120 A & N ISLANDS 2001 Professional Activity Female 30-44 0
5121 A & N ISLANDS 2001 Public Sector Undertaking Female 45-59 0
5122 A & N ISLANDS 2001 Student Male 15-29 2
5123 A & N ISLANDS 2001 Unemployed Male 60+ 0

562 rows × 6 columns

In [48]:
t_AN_2001 = df_st_AN_2001.loc[:,"Total"]

s1_19 = np.sum(t_AN_2001)
s1_19
Out[48]:
645
In [49]:
df_st_AP_2001 = df_2001.loc[(df_2001["State"]=="ANDHRA PRADESH")]

df_st_AP_2001
Out[49]:
State Year Type Gender Age_group Total
4993 ANDHRA PRADESH 2001 Death of Dear Person Male 0-14 0
4994 ANDHRA PRADESH 2001 Fall in Social Reputation Female 60+ 1
4995 ANDHRA PRADESH 2001 Insanity/Mental Illness Female 15-29 112
4996 ANDHRA PRADESH 2001 Others Male 30-44 293
4997 ANDHRA PRADESH 2001 Diploma Male 0-100+ 75
... ... ... ... ... ... ...
229228 ANDHRA PRADESH 2001 By Self Infliction of injury Female 45-59 6
229229 ANDHRA PRADESH 2001 Others Male 15-29 299
229230 ANDHRA PRADESH 2001 Professional Activity Female 45-59 10
229231 ANDHRA PRADESH 2001 Retired Person Female 0-14 0
229232 ANDHRA PRADESH 2001 Unemployed Male 60+ 12

566 rows × 6 columns

In [50]:
t_AP_2001 = df_st_AP_2001.loc[:,"Total"]

s1_20 = np.sum(t_AP_2001)
s1_20
Out[50]:
52610
In [51]:
df_st_ARP_2001 = df_2001.loc[(df_2001["State"]=="ARUNACHAL PRADESH")]

df_st_ARP_2001
Out[51]:
State Year Type Gender Age_group Total
9446 ARUNACHAL PRADESH 2001 Illegitimate Pregnancy Female 45-59 0
9447 ARUNACHAL PRADESH 2001 Illegitimate Pregnancy Male 0-14 0
9884 ARUNACHAL PRADESH 2001 Cancellation/Non-Settlement of Marriage Male 30-44 0
9885 ARUNACHAL PRADESH 2001 Poverty Female 60+ 0
9886 ARUNACHAL PRADESH 2001 Property Dispute Female 45-59 0
... ... ... ... ... ... ...
229551 ARUNACHAL PRADESH 2001 Unemployment Female 45-59 0
229552 ARUNACHAL PRADESH 2001 By Jumping from (Building) Male 15-29 0
229553 ARUNACHAL PRADESH 2001 By Jumping from (Building) Male 60+ 0
229554 ARUNACHAL PRADESH 2001 Others Female 60+ 0
229555 ARUNACHAL PRADESH 2001 Service (Private) Female 45-59 0

556 rows × 6 columns

In [52]:
t_ARP_2001 = df_st_ARP_2001.loc[:,"Total"]

s1_21 = np.sum(t_ARP_2001)
s1_21
Out[52]:
555
In [53]:
df_st_AS_2001 = df_2001.loc[(df_2001["State"]=="ASSAM")]

df_st_AS_2001
Out[53]:
State Year Type Gender Age_group Total
14732 ASSAM 2001 Causes Not known Male 30-44 163
14733 ASSAM 2001 Causes Not known Male 60+ 19
14734 ASSAM 2001 Divorce Female 30-44 1
14735 ASSAM 2001 Fall in Social Reputation Male 60+ 0
14736 ASSAM 2001 Family Problems Male 15-29 53
... ... ... ... ... ... ...
229752 ASSAM 2001 Others Male 60+ 18
229753 ASSAM 2001 Retired Person Male 15-29 0
229754 ASSAM 2001 Self-employed (Business activity) Female 60+ 0
229755 ASSAM 2001 Self-employed (Business activity) Male 15-29 59
229756 ASSAM 2001 Service (Government) Male 30-44 25

565 rows × 6 columns

In [54]:
t_AS_2001 = df_st_AS_2001.loc[:,"Total"]

s1_22 = np.sum(t_AS_2001)
s1_22
Out[54]:
13230
In [55]:
df_st_BH_2001 = df_2001.loc[(df_2001["State"]=="BIHAR")]

df_st_BH_2001
Out[55]:
State Year Type Gender Age_group Total
21965 BIHAR 2001 Death of Dear Person Female 60+ 0
21966 BIHAR 2001 Death of Dear Person Male 45-59 0
21967 BIHAR 2001 Divorce Male 45-59 0
21968 BIHAR 2001 Illegitimate Pregnancy Male 45-59 0
21969 BIHAR 2001 Insanity/Mental Illness Female 30-44 2
... ... ... ... ... ... ...
229955 BIHAR 2001 Retired Person Male 0-14 0
229956 BIHAR 2001 Self-employed (Business activity) Female 15-29 0
229957 BIHAR 2001 Self-employed (Business activity) Female 60+ 0
229958 BIHAR 2001 Service (Government) Female 60+ 0
229959 BIHAR 2001 Student Male 60+ 0

566 rows × 6 columns

In [56]:
t_BH_2001 = df_st_BH_2001.loc[:,"Total"]

s1_23 = np.sum(t_BH_2001)
s1_23
Out[56]:
3015
In [57]:
df_st_CH_2001 = df_2001.loc[(df_2001["State"]=="CHANDIGARH")]

df_st_CH_2001
Out[57]:
State Year Type Gender Age_group Total
27317 CHANDIGARH 2001 Bankruptcy or Sudden change in Economic Male 45-59 0
27318 CHANDIGARH 2001 Death of Dear Person Female 15-29 0
27319 CHANDIGARH 2001 Dowry Dispute Female 45-59 0
27320 CHANDIGARH 2001 Drug Abuse/Addiction Female 0-14 0
27321 CHANDIGARH 2001 Failure in Examination Female 0-14 0
... ... ... ... ... ... ...
230185 CHANDIGARH 2001 By touching electric wires Male 45-59 0
230186 CHANDIGARH 2001 Professional Activity Male 15-29 0
230187 CHANDIGARH 2001 Public Sector Undertaking Male 15-29 0
230188 CHANDIGARH 2001 Public Sector Undertaking Male 60+ 0
230189 CHANDIGARH 2001 Self-employed (Business activity) Male 0-14 0

562 rows × 6 columns

In [58]:
t_CH_2001 = df_st_CH_2001.loc[:,"Total"]

s1_24 = np.sum(t_CH_2001)
s1_24
Out[58]:
350
In [59]:
df_st_CT_2001 = df_2001.loc[(df_2001["State"]=="CHHATTISGARH")]

df_st_CT_2001
Out[59]:
State Year Type Gender Age_group Total
34515 CHHATTISGARH 2001 Cancellation/Non-Settlement of Marriage Female 60+ 0
34516 CHHATTISGARH 2001 Causes Not known Female 0-14 13
34517 CHHATTISGARH 2001 Dowry Dispute Female 60+ 0
34518 CHHATTISGARH 2001 Family Problems Female 30-44 81
34519 CHHATTISGARH 2001 Family Problems Male 0-14 4
... ... ... ... ... ... ...
230422 CHHATTISGARH 2001 House Wife Female 60+ 26
230423 CHHATTISGARH 2001 Professional Activity Male 0-14 0
230424 CHHATTISGARH 2001 Public Sector Undertaking Male 0-14 0
230425 CHHATTISGARH 2001 Service (Private) Male 60+ 6
230426 CHHATTISGARH 2001 Widowed/Widower Female 0-100+ 65

565 rows × 6 columns

In [60]:
t_CT_2001 = df_st_CT_2001.loc[:,"Total"]

s1_25 = np.sum(t_CT_2001)
s1_25
Out[60]:
20051
In [61]:
df_st_DN_2001 = df_2001.loc[(df_2001["State"]=="D & N HAVELI")]

df_st_DN_2001
Out[61]:
State Year Type Gender Age_group Total
40696 D & N HAVELI 2001 Bankruptcy or Sudden change in Economic Male 15-29 0
40697 D & N HAVELI 2001 Bankruptcy or Sudden change in Economic Male 60+ 0
40698 D & N HAVELI 2001 Causes Not known Female 30-44 0
40699 D & N HAVELI 2001 Failure in Examination Male 30-44 0
40700 D & N HAVELI 2001 Insanity/Mental Illness Female 0-14 0
... ... ... ... ... ... ...
230621 D & N HAVELI 2001 By touching electric wires Male 60+ 0
230622 D & N HAVELI 2001 House Wife Female 15-29 9
230623 D & N HAVELI 2001 Self-employed (Business activity) Female 45-59 0
230624 D & N HAVELI 2001 Student Male 45-59 0
230625 D & N HAVELI 2001 Unemployed Male 0-14 0

559 rows × 6 columns

In [62]:
t_DN_2001 = df_st_DN_2001.loc[:,"Total"]

s1_26 = np.sum(t_DN_2001)
s1_26
Out[62]:
250
In [63]:
df_st_DD_2001 = df_2001.loc[(df_2001["State"]=="DAMAN & DIU")]

df_st_DD_2001
Out[63]:
State Year Type Gender Age_group Total
47849 DAMAN & DIU 2001 Drug Abuse/Addiction Female 15-29 0
47850 DAMAN & DIU 2001 Drug Abuse/Addiction Female 60+ 0
47851 DAMAN & DIU 2001 Failure in Examination Female 15-29 0
47852 DAMAN & DIU 2001 Insanity/Mental Illness Male 0-14 0
47853 DAMAN & DIU 2001 Others Female 45-59 0
... ... ... ... ... ... ...
230832 DAMAN & DIU 2001 By Hanging Male 30-44 3
230833 DAMAN & DIU 2001 By Hanging Male 60+ 0
230834 DAMAN & DIU 2001 House Wife Female 45-59 0
230835 DAMAN & DIU 2001 Service (Government) Female 45-59 0
230836 DAMAN & DIU 2001 Unemployed Male 45-59 0

557 rows × 6 columns

In [64]:
t_DD_2001 = df_st_DD_2001.loc[:,"Total"]

s1_27 = np.sum(t_DD_2001)
s1_27
Out[64]:
69
In [65]:
df_st_DL_2001 = df_2001.loc[(df_2001["State"]=="DELHI (UT)")]

df_st_DL_2001
Out[65]:
State Year Type Gender Age_group Total
52761 DELHI (UT) 2001 Cancer Female 60+ 0
52762 DELHI (UT) 2001 Cancer Male 45-59 0
52763 DELHI (UT) 2001 Not having Children(Barrenness/Impotency Female 45-59 0
52764 DELHI (UT) 2001 Not having Children(Barrenness/Impotency Male 15-29 0
52765 DELHI (UT) 2001 Suspected/Illicit Relation Female 45-59 0
... ... ... ... ... ... ...
231025 DELHI (UT) 2001 Others Female 15-29 43
231026 DELHI (UT) 2001 Service (Government) Male 15-29 11
231027 DELHI (UT) 2001 Service (Private) Female 0-14 0
231028 DELHI (UT) 2001 Student Female 30-44 0
231029 DELHI (UT) 2001 Unemployed Female 15-29 13

566 rows × 6 columns

In [66]:
t_DL_2001 = df_st_DL_2001.loc[:,"Total"]

s1_28 = np.sum(t_DL_2001)
s1_28
Out[66]:
6195
In [67]:
df_st_GOA_2001 = df_2001.loc[(df_2001["State"]=="GOA")]

df_st_GOA_2001
Out[67]:
State Year Type Gender Age_group Total
58265 GOA 2001 Divorce Female 45-59 0
58266 GOA 2001 Dowry Dispute Female 30-44 0
58267 GOA 2001 Dowry Dispute Male 60+ 0
58268 GOA 2001 Drug Abuse/Addiction Male 45-59 0
58269 GOA 2001 Family Problems Male 30-44 16
... ... ... ... ... ... ...
231284 GOA 2001 By Jumping from (Other sites) Female 45-59 0
231285 GOA 2001 By Jumping off Moving Vehicles/Trains Male 60+ 0
231286 GOA 2001 House Wife Male 0-14 0
231287 GOA 2001 Professional Activity Female 15-29 0
231288 GOA 2001 Public Sector Undertaking Female 15-29 0

563 rows × 6 columns

In [68]:
t_GOA_2001 = df_st_GOA_2001.loc[:,"Total"]

s1_29 = np.sum(t_GOA_2001)
s1_29
Out[68]:
1280
In [69]:
df_st_GJ_2001 = df_2001.loc[(df_2001["State"]=="GUJARAT")]

df_st_GJ_2001
Out[69]:
State Year Type Gender Age_group Total
63211 GUJARAT 2001 Death of Dear Person Female 60+ 3
63212 GUJARAT 2001 Failure in Examination Male 30-44 1
63213 GUJARAT 2001 Ideological Causes/Hero Worshipping Male 45-59 0
63214 GUJARAT 2001 Illegitimate Pregnancy Female 0-14 0
63215 GUJARAT 2001 Others Male 0-14 1
... ... ... ... ... ... ...
231509 GUJARAT 2001 By Jumping off Moving Vehicles/Trains Male 45-59 3
231510 GUJARAT 2001 By touching electric wires Female 45-59 2
231511 GUJARAT 2001 Public Sector Undertaking Female 15-29 8
231512 GUJARAT 2001 Public Sector Undertaking Male 45-59 21
231513 GUJARAT 2001 Service (Private) Female 15-29 18

566 rows × 6 columns

In [70]:
t_GJ_2001 = df_st_GJ_2001.loc[:,"Total"]

s1_30 = np.sum(t_GJ_2001)
s1_30
Out[70]:
23955
In [71]:
df_st_HR_2001 = df_2001.loc[(df_2001["State"]=="HARYANA")]

df_st_HR_2001
Out[71]:
State Year Type Gender Age_group Total
69947 HARYANA 2001 Bankruptcy or Sudden change in Economic Female 30-44 0
69948 HARYANA 2001 Cancer Male 60+ 0
69949 HARYANA 2001 Causes Not known Female 60+ 2
69950 HARYANA 2001 Divorce Female 45-59 0
69951 HARYANA 2001 Drug Abuse/Addiction Male 15-29 7
... ... ... ... ... ... ...
231711 HARYANA 2001 Public Sector Undertaking Female 15-29 14
231712 HARYANA 2001 Public Sector Undertaking Male 30-44 29
231713 HARYANA 2001 Service (Private) Female 15-29 24
231714 HARYANA 2001 Service (Private) Female 60+ 2
231715 HARYANA 2001 Unemployed Male 30-44 52

565 rows × 6 columns

In [72]:
t_HR_2001 = df_st_HR_2001.loc[:,"Total"]

s1_31 = np.sum(t_HR_2001)
s1_31
Out[72]:
10031
In [73]:
df_st_HP_2001 = df_2001.loc[(df_2001["State"]=="HIMACHAL PRADESH")]

df_st_HP_2001
Out[73]:
State Year Type Gender Age_group Total
76282 HIMACHAL PRADESH 2001 Death of Dear Person Female 45-59 1
76283 HIMACHAL PRADESH 2001 Death of Dear Person Female 60+ 0
76284 HIMACHAL PRADESH 2001 Divorce Male 0-14 0
76285 HIMACHAL PRADESH 2001 Insanity/Mental Illness Female 30-44 5
76286 HIMACHAL PRADESH 2001 Other Prolonged Illness Male 45-59 9
... ... ... ... ... ... ...
231938 HIMACHAL PRADESH 2001 Professional Activity Male 60+ 0
231939 HIMACHAL PRADESH 2001 Public Sector Undertaking Male 30-44 3
231940 HIMACHAL PRADESH 2001 Public Sector Undertaking Male 60+ 0
231941 HIMACHAL PRADESH 2001 Self-employed (Business activity) Male 60+ 0
231942 HIMACHAL PRADESH 2001 Widowed/Widower Male 0-100+ 2

566 rows × 6 columns

In [74]:
t_HP_2001 = df_st_HP_2001.loc[:,"Total"]

s1_32 = np.sum(t_HP_2001)
s1_32
Out[74]:
1535
In [75]:
df_st_JK_2001 = df_2001.loc[(df_2001["State"]=="JAMMU & KASHMIR")]

df_st_JK_2001
Out[75]:
State Year Type Gender Age_group Total
83786 JAMMU & KASHMIR 2001 Bankruptcy or Sudden change in Economic Female 30-44 0
83787 JAMMU & KASHMIR 2001 Cancellation/Non-Settlement of Marriage Male 0-14 0
83788 JAMMU & KASHMIR 2001 Death of Dear Person Male 30-44 0
83789 JAMMU & KASHMIR 2001 Dowry Dispute Female 60+ 0
83790 JAMMU & KASHMIR 2001 Drug Abuse/Addiction Female 45-59 0
... ... ... ... ... ... ...
232157 JAMMU & KASHMIR 2001 Others Female 15-29 5
232158 JAMMU & KASHMIR 2001 Professional Activity Female 45-59 0
232159 JAMMU & KASHMIR 2001 Self-employed (Business activity) Female 45-59 0
232160 JAMMU & KASHMIR 2001 Student Male 45-59 0
232161 JAMMU & KASHMIR 2001 Divorcee Female 0-100+ 0

564 rows × 6 columns

In [76]:
t_JK_2001 = df_st_JK_2001.loc[:,"Total"]

s1_33 = np.sum(t_JK_2001)
s1_33
Out[76]:
765
In [77]:
df_st_JH_2001 = df_2001.loc[(df_2001["State"]=="JHARKHAND")]

df_st_JH_2001
Out[77]:
State Year Type Gender Age_group Total
89432 JHARKHAND 2001 Cancellation/Non-Settlement of Marriage Female 45-59 0
89433 JHARKHAND 2001 Divorce Male 60+ 0
89434 JHARKHAND 2001 Drug Abuse/Addiction Male 30-44 0
89435 JHARKHAND 2001 Fall in Social Reputation Male 15-29 0
89436 JHARKHAND 2001 Family Problems Male 0-14 0
... ... ... ... ... ... ...
232386 JHARKHAND 2001 Professional Activity Male 30-44 2
232387 JHARKHAND 2001 Public Sector Undertaking Female 0-14 0
232388 JHARKHAND 2001 Public Sector Undertaking Male 45-59 0
232389 JHARKHAND 2001 Service (Government) Male 0-14 0
232390 JHARKHAND 2001 Widowed/Widower Male 0-100+ 1

565 rows × 6 columns

In [78]:
t_JH_2001 = df_st_JH_2001.loc[:,"Total"]

s1_34 = np.sum(t_JH_2001)
s1_34
Out[78]:
1250
In [79]:
df_st_KN_2001 = df_2001.loc[(df_2001["State"]=="KARNATAKA")]

df_st_KN_2001
Out[79]:
State Year Type Gender Age_group Total
95028 KARNATAKA 2001 Divorce Female 15-29 2
95029 KARNATAKA 2001 Dowry Dispute Female 30-44 24
96620 KARNATAKA 2001 Bankruptcy or Sudden change in Economic Female 30-44 7
96621 KARNATAKA 2001 Death of Dear Person Male 15-29 11
96622 KARNATAKA 2001 Divorce Male 15-29 1
... ... ... ... ... ... ...
232603 KARNATAKA 2001 Public Sector Undertaking Female 15-29 15
232604 KARNATAKA 2001 Service (Government) Female 0-14 0
232605 KARNATAKA 2001 Student Female 0-14 60
232606 KARNATAKA 2001 Unemployed Female 45-59 5
232607 KARNATAKA 2001 Unemployed Male 15-29 225

566 rows × 6 columns

In [80]:
t_KN_2001 = df_st_KN_2001.loc[:,"Total"]

s1_35 = np.sum(t_KN_2001)
s1_35
Out[80]:
59405
In [81]:
df_st_KER_2001 = df_2001.loc[(df_2001["State"]=="KERALA")]

df_st_KER_2001
Out[81]:
State Year Type Gender Age_group Total
101483 KERALA 2001 Cancellation/Non-Settlement of Marriage Female 60+ 0
101484 KERALA 2001 Failure in Examination Female 60+ 0
101485 KERALA 2001 Illegitimate Pregnancy Male 30-44 0
101486 KERALA 2001 Illness (Aids/STD) Male 30-44 0
101487 KERALA 2001 Love Affairs Female 0-14 0
... ... ... ... ... ... ...
232769 KERALA 2001 By Over Alcoholism Male 0-14 0
232770 KERALA 2001 By touching electric wires Male 0-14 0
232771 KERALA 2001 Self-employed (Business activity) Female 45-59 9
232772 KERALA 2001 Self-employed (Business activity) Male 45-59 177
232773 KERALA 2001 Service (Private) Male 60+ 92

566 rows × 6 columns

In [82]:
t_KER_2001 = df_st_KER_2001.loc[:,"Total"]

s1_36 = np.sum(t_KER_2001)
s1_36
Out[82]:
47860
In [83]:
df_st_LD_2001 = df_2001.loc[(df_2001["State"]=="LAKSHADWEEP")]

df_st_LD_2001
Out[83]:
State Year Type Gender Age_group Total
105890 LAKSHADWEEP 2001 Cancer Male 30-44 0
105891 LAKSHADWEEP 2001 Fall in Social Reputation Female 60+ 0
105892 LAKSHADWEEP 2001 Insanity/Mental Illness Female 15-29 0
105893 LAKSHADWEEP 2001 Paralysis Female 45-59 0
105894 LAKSHADWEEP 2001 Paralysis Male 30-44 0
... ... ... ... ... ... ...
232990 LAKSHADWEEP 2001 By touching electric wires Male 45-59 0
232991 LAKSHADWEEP 2001 Professional Activity Male 15-29 0
232992 LAKSHADWEEP 2001 Public Sector Undertaking Male 15-29 0
232993 LAKSHADWEEP 2001 Self-employed (Business activity) Male 0-14 0
232994 LAKSHADWEEP 2001 Service (Government) Male 15-29 0

556 rows × 6 columns

In [84]:
t_LD_2001 = df_st_LD_2001.loc[:,"Total"]

s1_37 = np.sum(t_LD_2001)
s1_37
Out[84]:
0
In [85]:
df_st_MP_2001 = df_2001.loc[(df_2001["State"]=="MADHYA PRADESH")]

df_st_MP_2001
Out[85]:
State Year Type Gender Age_group Total
112210 MADHYA PRADESH 2001 Bankruptcy or Sudden change in Economic Male 0-14 0
112211 MADHYA PRADESH 2001 Bankruptcy or Sudden change in Economic Male 60+ 11
112212 MADHYA PRADESH 2001 Cancer Male 15-29 1
112213 MADHYA PRADESH 2001 Divorce Female 60+ 0
112214 MADHYA PRADESH 2001 Drug Abuse/Addiction Female 15-29 1
... ... ... ... ... ... ...
233225 MADHYA PRADESH 2001 Professional Activity Male 15-29 30
233226 MADHYA PRADESH 2001 Public Sector Undertaking Female 0-14 0
233227 MADHYA PRADESH 2001 Retired Person Female 30-44 0
233228 MADHYA PRADESH 2001 Service (Private) Female 60+ 0
233229 MADHYA PRADESH 2001 Divorcee Male 0-100+ 6

566 rows × 6 columns

In [86]:
t_MP_2001 = df_st_MP_2001.loc[:,"Total"]

s1_38 = np.sum(t_MP_2001)
s1_38
Out[86]:
34300
In [87]:
df_st_MH_2001 = df_2001.loc[(df_2001["State"]=="MAHARASHTRA")]

df_st_MH_2001
Out[87]:
State Year Type Gender Age_group Total
118717 MAHARASHTRA 2001 Death of Dear Person Female 15-29 19
118718 MAHARASHTRA 2001 Death of Dear Person Male 30-44 18
118719 MAHARASHTRA 2001 Divorce Male 30-44 8
118720 MAHARASHTRA 2001 Dowry Dispute Female 45-59 1
118721 MAHARASHTRA 2001 Fall in Social Reputation Male 15-29 21
... ... ... ... ... ... ...
233434 MAHARASHTRA 2001 By Over Alcoholism Male 30-44 125
233435 MAHARASHTRA 2001 By touching electric wires Female 15-29 4
233436 MAHARASHTRA 2001 Retired Person Female 0-14 0
233437 MAHARASHTRA 2001 Student Female 60+ 0
233438 MAHARASHTRA 2001 Widowed/Widower Male 0-100+ 247

566 rows × 6 columns

In [88]:
t_MH_2001 = df_st_MH_2001.loc[:,"Total"]

s1_39 = np.sum(t_MH_2001)
s1_39
Out[88]:
73090
In [89]:
df_st_MN_2001 = df_2001.loc[(df_2001["State"]=="MANIPUR")]

df_st_MN_2001
Out[89]:
State Year Type Gender Age_group Total
123298 MANIPUR 2001 Bankruptcy or Sudden change in Economic Female 60+ 0
124361 MANIPUR 2001 Cancellation/Non-Settlement of Marriage Male 60+ 0
124362 MANIPUR 2001 Cancer Female 30-44 0
124363 MANIPUR 2001 Cancer Male 60+ 0
124364 MANIPUR 2001 Divorce Male 30-44 0
... ... ... ... ... ... ...
233665 MANIPUR 2001 Others Female 0-14 0
233666 MANIPUR 2001 Others Male 45-59 0
233667 MANIPUR 2001 Others Male 45-59 3
233668 MANIPUR 2001 Retired Person Female 0-14 0
233669 MANIPUR 2001 Retired Person Male 45-59 0

561 rows × 6 columns

In [90]:
t_MN_2001 = df_st_MN_2001.loc[:,"Total"]

s1_40 = np.sum(t_MN_2001)
s1_40
Out[90]:
205
In [91]:
df_st_MG_2001 = df_2001.loc[(df_2001["State"]=="MEGHALAYA")]

df_st_MG_2001
Out[91]:
State Year Type Gender Age_group Total
130159 MEGHALAYA 2001 Bankruptcy or Sudden change in Economic Male 30-44 0
130160 MEGHALAYA 2001 Death of Dear Person Female 0-14 0
130161 MEGHALAYA 2001 Dowry Dispute Male 60+ 0
130162 MEGHALAYA 2001 Family Problems Female 30-44 0
130163 MEGHALAYA 2001 Illegitimate Pregnancy Female 60+ 0
... ... ... ... ... ... ...
233868 MEGHALAYA 2001 Others Male 45-59 0
233869 MEGHALAYA 2001 Retired Person Female 0-14 0
233870 MEGHALAYA 2001 Retired Person Male 30-44 2
233871 MEGHALAYA 2001 Retired Person Male 45-59 0
233872 MEGHALAYA 2001 Student Female 15-29 0

563 rows × 6 columns

In [92]:
t_MG_2001 = df_st_MG_2001.loc[:,"Total"]

s1_41 = np.sum(t_MG_2001)
s1_41
Out[92]:
435
In [93]:
df_st_MZ_2001 = df_2001.loc[(df_2001["State"]=="MIZORAM")]

df_st_MZ_2001
Out[93]:
State Year Type Gender Age_group Total
135226 MIZORAM 2001 Dowry Dispute Male 30-44 0
135227 MIZORAM 2001 Drug Abuse/Addiction Male 60+ 0
135228 MIZORAM 2001 Failure in Examination Female 15-29 0
135229 MIZORAM 2001 Graduate Male 0-100+ 0
135230 MIZORAM 2001 Primary Male 0-100+ 4
... ... ... ... ... ... ...
234036 MIZORAM 2001 By Consuming Other Poison Female 45-59 0
234037 MIZORAM 2001 By Fire/Self Immolation Female 0-14 0
234038 MIZORAM 2001 By Jumping from (Building) Female 45-59 0
234039 MIZORAM 2001 Farming/Agriculture Activity Female 15-29 0
234040 MIZORAM 2001 Never Married Male 0-100+ 21

563 rows × 6 columns

In [94]:
t_MN_2001 = df_st_MN_2001.loc[:,"Total"]

s1_42 = np.sum(t_MN_2001)
s1_42
Out[94]:
205
In [95]:
df_st_NG_2001 = df_2001.loc[(df_2001["State"]=="NAGALAND")]

df_st_NG_2001
Out[95]:
State Year Type Gender Age_group Total
140225 NAGALAND 2001 Dowry Dispute Female 45-59 0
140226 NAGALAND 2001 Drug Abuse/Addiction Male 15-29 0
140227 NAGALAND 2001 Fall in Social Reputation Female 0-14 0
140228 NAGALAND 2001 Insanity/Mental Illness Female 0-14 0
140229 NAGALAND 2001 Paralysis Male 0-14 0
... ... ... ... ... ... ...
234279 NAGALAND 2001 By Overdose of sleeping pills Female 60+ 0
234280 NAGALAND 2001 By Self Infliction of injury Female 15-29 0
234281 NAGALAND 2001 By Self Infliction of injury Female 60+ 0
234282 NAGALAND 2001 Retired Person Male 60+ 0
234283 NAGALAND 2001 Never Married Female 0-100+ 5

557 rows × 6 columns

In [96]:
t_NG_2001 = df_st_NG_2001.loc[:,"Total"]

s1_43 = np.sum(t_NG_2001)
s1_43
Out[96]:
200
In [97]:
df_st_OD_2001 = df_2001.loc[(df_2001["State"]=="ODISHA")]

df_st_OD_2001
Out[97]:
State Year Type Gender Age_group Total
147033 ODISHA 2001 Bankruptcy or Sudden change in Economic Female 0-14 0
147034 ODISHA 2001 Death of Dear Person Male 0-14 0
147035 ODISHA 2001 Not having Children(Barrenness/Impotency Male 0-14 0
147036 ODISHA 2001 Paralysis Female 60+ 0
147037 ODISHA 2001 Physical Abuse (Rape/Incest Etc.) Male 60+ 0
... ... ... ... ... ... ...
234463 ODISHA 2001 Others Female 45-59 22
234464 ODISHA 2001 Others Male 15-29 120
234465 ODISHA 2001 Student Male 15-29 111
234466 ODISHA 2001 Married Male 0-100+ 1294
234467 ODISHA 2001 Seperated Male 0-100+ 107

565 rows × 6 columns

In [98]:
t_OD_2001 = df_st_OD_2001.loc[:,"Total"]

s1_44 = np.sum(t_OD_2001)
s1_44
Out[98]:
20254
In [99]:
df_st_PD_2001 = df_2001.loc[(df_2001["State"]=="PUDUCHERRY")]

df_st_PD_2001
Out[99]:
State Year Type Gender Age_group Total
151413 PUDUCHERRY 2001 Bankruptcy or Sudden change in Economic Male 0-14 0
151414 PUDUCHERRY 2001 Dowry Dispute Female 45-59 0
151415 PUDUCHERRY 2001 Failure in Examination Female 60+ 0
151416 PUDUCHERRY 2001 Illegitimate Pregnancy Female 0-14 0
151417 PUDUCHERRY 2001 Insanity/Mental Illness Female 60+ 1
... ... ... ... ... ... ...
234673 PUDUCHERRY 2001 By Over Alcoholism Male 45-59 0
234674 PUDUCHERRY 2001 By touching electric wires Female 0-14 0
234675 PUDUCHERRY 2001 House Wife Male 15-29 0
234676 PUDUCHERRY 2001 Service (Government) Male 60+ 0
234677 PUDUCHERRY 2001 Unemployed Female 15-29 27

561 rows × 6 columns

In [100]:
t_PD_2001 = df_st_PD_2001.loc[:,"Total"]

s1_45 = np.sum(t_PD_2001)
s1_45
Out[100]:
2645
In [101]:
df_st_PB_2001 = df_2001.loc[(df_2001["State"]=="PUNJAB")]

df_st_PB_2001
Out[101]:
State Year Type Gender Age_group Total
157809 PUNJAB 2001 Not having Children(Barrenness/Impotency Male 45-59 0
157810 PUNJAB 2001 Physical Abuse (Rape/Incest Etc.) Female 30-44 4
157811 PUNJAB 2001 Professional/Career Problem Female 60+ 0
157812 PUNJAB 2001 By Consuming Insecticides Male 45-59 11
157813 PUNJAB 2001 By Fire-Arms Male 45-59 1
... ... ... ... ... ... ...
234891 PUNJAB 2001 Public Sector Undertaking Female 0-14 0
234892 PUNJAB 2001 Self-employed (Business activity) Male 45-59 6
234893 PUNJAB 2001 Service (Private) Female 15-29 3
234894 PUNJAB 2001 Service (Private) Female 60+ 0
234895 PUNJAB 2001 Unemployed Female 30-44 4

564 rows × 6 columns

In [102]:
t_PB_2001 = df_st_PB_2001.loc[:,"Total"]

s1_46 = np.sum(t_PB_2001)
s1_46
Out[102]:
3240
In [103]:
df_st_RJ_2001 = df_2001.loc[(df_2001["State"]=="RAJASTHAN")]

df_st_RJ_2001
Out[103]:
State Year Type Gender Age_group Total
162305 RAJASTHAN 2001 Bankruptcy or Sudden change in Economic Male 0-14 0
162306 RAJASTHAN 2001 Death of Dear Person Male 0-14 0
162307 RAJASTHAN 2001 Death of Dear Person Male 15-29 3
162308 RAJASTHAN 2001 Family Problems Female 45-59 21
162309 RAJASTHAN 2001 Illness (Aids/STD) Female 30-44 0
... ... ... ... ... ... ...
235082 RAJASTHAN 2001 By touching electric wires Male 60+ 1
235083 RAJASTHAN 2001 Others Female 60+ 12
235084 RAJASTHAN 2001 Retired Person Female 15-29 0
235085 RAJASTHAN 2001 Self-employed (Business activity) Female 30-44 3
235086 RAJASTHAN 2001 Service (Private) Male 30-44 84

566 rows × 6 columns

In [104]:
t_RJ_2001 = df_st_RJ_2001.loc[:,"Total"]

s1_47 = np.sum(t_RJ_2001)
s1_47
Out[104]:
15975
In [105]:
df_st_SM_2001 = df_2001.loc[(df_2001["State"]=="SIKKIM")]

df_st_SM_2001
Out[105]:
State Year Type Gender Age_group Total
169210 SIKKIM 2001 Bankruptcy or Sudden change in Economic Female 45-59 0
169211 SIKKIM 2001 Cancellation/Non-Settlement of Marriage Female 60+ 0
169212 SIKKIM 2001 Death of Dear Person Male 45-59 0
169213 SIKKIM 2001 Failure in Examination Female 0-14 0
169214 SIKKIM 2001 Family Problems Male 30-44 5
... ... ... ... ... ... ...
235289 SIKKIM 2001 By Hanging Female 0-14 2
235290 SIKKIM 2001 Others Male 0-14 0
235291 SIKKIM 2001 By Over Alcoholism Male 30-44 0
235292 SIKKIM 2001 Others Female 45-59 0
235293 SIKKIM 2001 Unemployed Female 60+ 0

559 rows × 6 columns

In [106]:
t_SM_2001 = df_st_SM_2001.loc[:,"Total"]

s1_48 = np.sum(t_SM_2001)
s1_48
Out[106]:
470
In [107]:
df_st_TN_2001 = df_2001.loc[(df_2001["State"]=="TAMIL NADU")]

df_st_TN_2001
Out[107]:
State Year Type Gender Age_group Total
173320 TAMIL NADU 2001 Cancer Female 60+ 1
173321 TAMIL NADU 2001 Causes Not known Male 15-29 202
173322 TAMIL NADU 2001 Family Problems Male 0-14 22
173323 TAMIL NADU 2001 Insanity/Mental Illness Male 45-59 54
173324 TAMIL NADU 2001 Love Affairs Female 60+ 0
... ... ... ... ... ... ...
235527 TAMIL NADU 2001 By Consuming Insecticides Male 0-14 17
235528 TAMIL NADU 2001 By Fire-Arms Male 30-44 2
235529 TAMIL NADU 2001 By Fire-Arms Male 45-59 0
235530 TAMIL NADU 2001 Retired Person Female 30-44 0
235531 TAMIL NADU 2001 Self-employed (Business activity) Male 0-14 2

566 rows × 6 columns

In [108]:
t_TN_2001 = df_st_TN_2001.loc[:,"Total"]

s1_49 = np.sum(t_TN_2001)
s1_49
Out[108]:
56450
In [109]:
df_st_TP_2001 = df_2001.loc[(df_2001["State"]=="TRIPURA")]

df_st_TP_2001
Out[109]:
State Year Type Gender Age_group Total
179333 TRIPURA 2001 Bankruptcy or Sudden change in Economic Female 30-44 0
179334 TRIPURA 2001 Causes Not known Female 15-29 25
179335 TRIPURA 2001 Family Problems Male 45-59 34
179336 TRIPURA 2001 Ideological Causes/Hero Worshipping Male 60+ 0
179337 TRIPURA 2001 Illegitimate Pregnancy Male 60+ 0
... ... ... ... ... ... ...
235736 TRIPURA 2001 Others Male 0-14 1
235737 TRIPURA 2001 Others Male 15-29 10
235738 TRIPURA 2001 Farming/Agriculture Activity Male 15-29 10
235739 TRIPURA 2001 House Wife Female 45-59 8
235740 TRIPURA 2001 Service (Government) Male 0-14 0

566 rows × 6 columns

In [110]:
t_TP_2001 = df_st_TP_2001.loc[:,"Total"]

s1_50 = np.sum(t_TP_2001)
s1_50
Out[110]:
4270
In [111]:
df_st_UP_2001 = df_2001.loc[(df_2001["State"]=="UTTAR PRADESH")]

df_st_UP_2001
Out[111]:
State Year Type Gender Age_group Total
183500 UTTAR PRADESH 2001 Ideological Causes/Hero Worshipping Female 15-29 1
183501 UTTAR PRADESH 2001 Not having Children(Barrenness/Impotency Female 60+ 0
183502 UTTAR PRADESH 2001 Professional/Career Problem Female 15-29 0
183503 UTTAR PRADESH 2001 Suspected/Illicit Relation Male 60+ 0
183504 UTTAR PRADESH 2001 By Consuming Insecticides Female 45-59 20
... ... ... ... ... ... ...
235938 UTTAR PRADESH 2001 Poverty Female 60+ 1
235939 UTTAR PRADESH 2001 No Education Male 0-100+ 359
235940 UTTAR PRADESH 2001 By Fire/Self Immolation Male 0-14 5
235941 UTTAR PRADESH 2001 Others Male 15-29 57
235942 UTTAR PRADESH 2001 Service (Government) Female 45-59 0

566 rows × 6 columns

In [112]:
t_UP_2001 = df_st_UP_2001.loc[:,"Total"]

s1_51 = np.sum(t_UP_2001)
s1_51
Out[112]:
17580
In [113]:
df_st_UK_2001 = df_2001.loc[(df_2001["State"]=="UTTARAKHAND")]

df_st_UK_2001
Out[113]:
State Year Type Gender Age_group Total
189926 UTTARAKHAND 2001 Dowry Dispute Male 60+ 0
189927 UTTARAKHAND 2001 Drug Abuse/Addiction Male 45-59 3
189928 UTTARAKHAND 2001 Illness (Aids/STD) Male 0-14 0
189929 UTTARAKHAND 2001 Insanity/Mental Illness Female 15-29 2
189930 UTTARAKHAND 2001 Not having Children(Barrenness/Impotency Male 45-59 0
... ... ... ... ... ... ...
236152 UTTARAKHAND 2001 House Wife Male 0-14 0
236153 UTTARAKHAND 2001 Professional Activity Female 15-29 0
236154 UTTARAKHAND 2001 Public Sector Undertaking Female 0-14 0
236155 UTTARAKHAND 2001 Self-employed (Business activity) Female 0-14 0
236156 UTTARAKHAND 2001 Divorcee Male 0-100+ 0

563 rows × 6 columns

In [114]:
t_UK_2001 = df_st_UK_2001.loc[:,"Total"]

s1_52 = np.sum(t_UK_2001)
s1_52
Out[114]:
1555
In [115]:
df_st_WB_2001 = df_2001.loc[(df_2001["State"]=="WEST BENGAL")]

df_st_WB_2001
Out[115]:
State Year Type Gender Age_group Total
194664 WEST BENGAL 2001 Divorce Male 15-29 1
194665 WEST BENGAL 2001 Failure in Examination Female 60+ 0
194666 WEST BENGAL 2001 Family Problems Male 15-29 281
194667 WEST BENGAL 2001 Love Affairs Female 60+ 0
194668 WEST BENGAL 2001 Other Prolonged Illness Female 60+ 39
... ... ... ... ... ... ...
236377 WEST BENGAL 2001 By Overdose of sleeping pills Male 30-44 101
236378 WEST BENGAL 2001 By touching electric wires Female 0-14 8
236379 WEST BENGAL 2001 Public Sector Undertaking Male 45-59 137
236380 WEST BENGAL 2001 Retired Person Female 60+ 28
236381 WEST BENGAL 2001 Unemployed Female 30-44 110

566 rows × 6 columns

In [116]:
t_WB_2001 = df_st_WB_2001.loc[:,"Total"]

s1_53 = np.sum(t_WB_2001)
s1_53
Out[116]:
68450
In [117]:
t_ANm_2001 = np.sum(df_st_AN_2001.where(df_st_AN_2001["Gender"]=="Male")["Total"])
t_ANm_2001
Out[117]:
395.0
In [118]:
t_ANfm_2001 = np.sum(df_st_AN_2001.where(df_st_AN_2001["Gender"]=="Female")["Total"])
t_ANfm_2001
Out[118]:
250.0
In [119]:
t_APm_2001 = np.sum(df_st_AP_2001.where(df_st_AP_2001["Gender"]=="Male")["Total"])
t_APm_2001
Out[119]:
31895.0
In [120]:
t_APfm_2001 = np.sum(df_st_AP_2001.where(df_st_AP_2001["Gender"]=="Female")["Total"])
t_APfm_2001
Out[120]:
20715.0
In [121]:
t_ARPm_2001 = np.sum(df_st_ARP_2001.where(df_st_ARP_2001["Gender"]=="Male")["Total"])
t_ARPm_2001
Out[121]:
380.0
In [122]:
t_ARPfm_2001 = np.sum(df_st_ARP_2001.where(df_st_ARP_2001["Gender"]=="Female")["Total"])
t_ARPfm_2001
Out[122]:
175.0
In [123]:
t_ASm_2001 = np.sum(df_st_AS_2001.where(df_st_AS_2001["Gender"]=="Male")["Total"])
t_ASm_2001
Out[123]:
9180.0
In [124]:
t_ASfm_2001 = np.sum(df_st_AS_2001.where(df_st_AS_2001["Gender"]=="Female")["Total"])
t_ASfm_2001
Out[124]:
4050.0
In [125]:
t_BHm_2001 = np.sum(df_st_BH_2001.where(df_st_BH_2001["Gender"]=="Male")["Total"])
t_BHm_2001
Out[125]:
1535.0
In [126]:
t_BHfm_2001 = np.sum(df_st_BH_2001.where(df_st_BH_2001["Gender"]=="Female")["Total"])
t_BHfm_2001
Out[126]:
1480.0
In [127]:
t_CHm_2001 = np.sum(df_st_CH_2001.where(df_st_CH_2001["Gender"]=="Male")["Total"])
t_CHm_2001
Out[127]:
195.0
In [128]:
t_CHfm_2001 = np.sum(df_st_CH_2001.where(df_st_CH_2001["Gender"]=="Female")["Total"])
t_CHfm_2001
Out[128]:
155.0
In [129]:
t_CTm_2001 = np.sum(df_st_CT_2001.where(df_st_CT_2001["Gender"]=="Male")["Total"])
t_CTm_2001
Out[129]:
13200.0
In [130]:
t_CTfm_2001 = np.sum(df_st_CT_2001.where(df_st_CT_2001["Gender"]=="Female")["Total"])
t_CTfm_2001
Out[130]:
6851.0
In [131]:
t_DNm_2001 = np.sum(df_st_DN_2001.where(df_st_DN_2001["Gender"]=="Male")["Total"])
t_DNm_2001
Out[131]:
175.0
In [132]:
t_DNfm_2001 = np.sum(df_st_DN_2001.where(df_st_DN_2001["Gender"]=="Female")["Total"])
t_DNfm_2001
Out[132]:
75.0
In [133]:
t_DDm_2001 = np.sum(df_st_DD_2001.where(df_st_DD_2001["Gender"]=="Male")["Total"])
t_DDm_2001
Out[133]:
49.0
In [134]:
t_DDfm_2001 = np.sum(df_st_DD_2001.where(df_st_DD_2001["Gender"]=="Female")["Total"])
t_DDfm_2001
Out[134]:
20.0
In [135]:
t_DLm_2001 = np.sum(df_st_DL_2001.where(df_st_DL_2001["Gender"]=="Male")["Total"])
t_DLm_2001
Out[135]:
3650.0
In [136]:
t_DLfm_2001 = np.sum(df_st_DL_2001.where(df_st_DL_2001["Gender"]=="Female")["Total"])
t_DLfm_2001
Out[136]:
2545.0
In [137]:
t_GOAm_2001 = np.sum(df_st_GOA_2001.where(df_st_GOA_2001["Gender"]=="Male")["Total"])
t_GOAm_2001
Out[137]:
835.0
In [138]:
t_GOAfm_2001 = np.sum(df_st_GOA_2001.where(df_st_GOA_2001["Gender"]=="Female")["Total"])
t_GOAfm_2001
Out[138]:
445.0
In [139]:
t_GJm_2001 = np.sum(df_st_GJ_2001.where(df_st_GJ_2001["Gender"]=="Male")["Total"])
t_GJm_2001
Out[139]:
13245.0
In [140]:
t_GJfm_2001 = np.sum(df_st_GJ_2001.where(df_st_GJ_2001["Gender"]=="Female")["Total"])
t_GJfm_2001
Out[140]:
10710.0
In [141]:
t_HRm_2001 = np.sum(df_st_HR_2001.where(df_st_HR_2001["Gender"]=="Male")["Total"])
t_HRm_2001
Out[141]:
6820.0
In [142]:
t_HRfm_2001 = np.sum(df_st_HR_2001.where(df_st_HR_2001["Gender"]=="Female")["Total"])
t_HRfm_2001
Out[142]:
3211.0
In [143]:
t_HPm_2001 = np.sum(df_st_HP_2001.where(df_st_HP_2001["Gender"]=="Male")["Total"])
t_HPm_2001
Out[143]:
885.0
In [144]:
t_HPfm_2001 = np.sum(df_st_HP_2001.where(df_st_HP_2001["Gender"]=="Female")["Total"])
t_HPfm_2001
Out[144]:
650.0
In [145]:
t_JKm_2001 = np.sum(df_st_JK_2001.where(df_st_JK_2001["Gender"]=="Male")["Total"])
t_JKm_2001
Out[145]:
455.0
In [146]:
t_JKfm_2001 = np.sum(df_st_JK_2001.where(df_st_JK_2001["Gender"]=="Female")["Total"])
t_JKfm_2001
Out[146]:
310.0
In [147]:
t_JHm_2001 = np.sum(df_st_JH_2001.where(df_st_JH_2001["Gender"]=="Male")["Total"])
t_JHm_2001
Out[147]:
705.0
In [148]:
t_JHfm_2001 = np.sum(df_st_JH_2001.where(df_st_JH_2001["Gender"]=="Female")["Total"])
t_JHfm_2001
Out[148]:
545.0
In [149]:
t_KNm_2001 = np.sum(df_st_KN_2001.where(df_st_KN_2001["Gender"]=="Male")["Total"])
t_KNm_2001
Out[149]:
39355.0
In [150]:
t_KNfm_2001 = np.sum(df_st_KN_2001.where(df_st_KN_2001["Gender"]=="Female")["Total"])
t_KNfm_2001
Out[150]:
20050.0
In [151]:
t_KERm_2001 = np.sum(df_st_KER_2001.where(df_st_KER_2001["Gender"]=="Male")["Total"])
t_KERm_2001
Out[151]:
33935.0
In [152]:
t_KERfm_2001 = np.sum(df_st_KER_2001.where(df_st_KER_2001["Gender"]=="Female")["Total"])
t_KERfm_2001
Out[152]:
13925.0
In [153]:
t_LDm_2001 = np.sum(df_st_LD_2001.where(df_st_LD_2001["Gender"]=="Male")["Total"])
t_LDm_2001
Out[153]:
0.0
In [154]:
t_LDfm_2001 = np.sum(df_st_LD_2001.where(df_st_LD_2001["Gender"]=="Female")["Total"])
t_LDfm_2001
Out[154]:
0.0
In [155]:
t_MPm_2001 = np.sum(df_st_MP_2001.where(df_st_MP_2001["Gender"]=="Male")["Total"])
t_MPm_2001
Out[155]:
17680.0
In [156]:
t_MPfm_2001 = np.sum(df_st_MP_2001.where(df_st_MP_2001["Gender"]=="Female")["Total"])
t_MPfm_2001
Out[156]:
16620.0
In [157]:
t_MHm_2001 = np.sum(df_st_MH_2001.where(df_st_MH_2001["Gender"]=="Male")["Total"])
t_MHm_2001
Out[157]:
46690.0
In [158]:
t_MHfm_2001 = np.sum(df_st_MH_2001.where(df_st_MH_2001["Gender"]=="Female")["Total"])
t_MHfm_2001
Out[158]:
26400.0
In [159]:
t_MNm_2001 = np.sum(df_st_MN_2001.where(df_st_MN_2001["Gender"]=="Male")["Total"])
t_MNm_2001
Out[159]:
120.0
In [160]:
t_MNfm_2001 = np.sum(df_st_MN_2001.where(df_st_MN_2001["Gender"]=="Female")["Total"])
t_MNfm_2001
Out[160]:
85.0
In [161]:
t_MGm_2001 = np.sum(df_st_MG_2001.where(df_st_MG_2001["Gender"]=="Male")["Total"])
t_MGm_2001
Out[161]:
345.0
In [162]:
t_MGfm_2001 = np.sum(df_st_MG_2001.where(df_st_MG_2001["Gender"]=="Female")["Total"])
t_MGfm_2001
Out[162]:
90.0
In [163]:
t_MZm_2001 = np.sum(df_st_MZ_2001.where(df_st_MZ_2001["Gender"]=="Male")["Total"])
t_MZm_2001
Out[163]:
230.0
In [164]:
t_MZfm_2001 = np.sum(df_st_MZ_2001.where(df_st_MZ_2001["Gender"]=="Female")["Total"])
t_MZfm_2001
Out[164]:
40.0
In [165]:
t_NGm_2001 = np.sum(df_st_NG_2001.where(df_st_NG_2001["Gender"]=="Male")["Total"])
t_NGm_2001
Out[165]:
125.0
In [166]:
t_NGfm_2001 = np.sum(df_st_NG_2001.where(df_st_NG_2001["Gender"]=="Female")["Total"])
t_MGfm_2001
Out[166]:
90.0
In [167]:
t_ODm_2001 = np.sum(df_st_OD_2001.where(df_st_OD_2001["Gender"]=="Male")["Total"])
t_ODm_2001
Out[167]:
10439.0
In [168]:
t_ODfm_2001 = np.sum(df_st_OD_2001.where(df_st_OD_2001["Gender"]=="Female")["Total"])
t_ODfm_2001
Out[168]:
9815.0
In [169]:
t_PDm_2001 = np.sum(df_st_PD_2001.where(df_st_PD_2001["Gender"]=="Male")["Total"])
t_PDm_2001
Out[169]:
1615.0
In [170]:
t_PDfm_2001 = np.sum(df_st_PD_2001.where(df_st_PD_2001["Gender"]=="Female")["Total"])
t_PDfm_2001
Out[170]:
1030.0
In [171]:
t_PBm_2001 = np.sum(df_st_PB_2001.where(df_st_PB_2001["Gender"]=="Male")["Total"])
t_PBm_2001
Out[171]:
1980.0
In [172]:
t_PBfm_2001 = np.sum(df_st_PB_2001.where(df_st_PB_2001["Gender"]=="Female")["Total"])
t_PBfm_2001
Out[172]:
1260.0
In [173]:
t_RJm_2001 = np.sum(df_st_RJ_2001.where(df_st_RJ_2001["Gender"]=="Male")["Total"])
t_RJm_2001
Out[173]:
9795.0
In [174]:
t_RJfm_2001 = np.sum(df_st_RJ_2001.where(df_st_RJ_2001["Gender"]=="Female")["Total"])
t_RJfm_2001
Out[174]:
6180.0
In [175]:
t_SMm_2001 = np.sum(df_st_SM_2001.where(df_st_SM_2001["Gender"]=="Male")["Total"])
t_SMm_2001
Out[175]:
310.0
In [176]:
t_SMfm_2001 = np.sum(df_st_SM_2001.where(df_st_SM_2001["Gender"]=="Female")["Total"])
t_SMfm_2001
Out[176]:
160.0
In [177]:
t_TNm_2001 = np.sum(df_st_TN_2001.where(df_st_TN_2001["Gender"]=="Male")["Total"])
t_TNm_2001
Out[177]:
35640.0
In [178]:
t_TNfm_2001 = np.sum(df_st_TN_2001.where(df_st_TN_2001["Gender"]=="Female")["Total"])
t_TNfm_2001
Out[178]:
20810.0
In [179]:
t_TPm_2001 = np.sum(df_st_TP_2001.where(df_st_TP_2001["Gender"]=="Male")["Total"])
t_TPm_2001
Out[179]:
2315.0
In [180]:
t_TPfm_2001 = np.sum(df_st_TP_2001.where(df_st_TP_2001["Gender"]=="Female")["Total"])
t_TPfm_2001
Out[180]:
1955.0
In [181]:
t_UPm_2001 = np.sum(df_st_UP_2001.where(df_st_UP_2001["Gender"]=="Male")["Total"])
t_UPm_2001
Out[181]:
9005.0
In [182]:
t_UPfm_2001 = np.sum(df_st_UP_2001.where(df_st_UP_2001["Gender"]=="Female")["Total"])
t_UPfm_2001
Out[182]:
8575.0
In [183]:
t_UKm_2001 = np.sum(df_st_UK_2001.where(df_st_UK_2001["Gender"]=="Male")["Total"])
t_UKm_2001
Out[183]:
910.0
In [184]:
t_UKfm_2001 = np.sum(df_st_UK_2001.where(df_st_UK_2001["Gender"]=="Female")["Total"])
t_UKfm_2001
Out[184]:
645.0
In [185]:
t_WBm_2001 = np.sum(df_st_WB_2001.where(df_st_WB_2001["Gender"]=="Male")["Total"])
t_WBm_2001
Out[185]:
37475.0
In [186]:
t_WBfm_2001 = np.sum(df_st_WB_2001.where(df_st_WB_2001["Gender"]=="Female")["Total"])
t_WBfm_2001
Out[186]:
30975.0
In [187]:
l_2001=list(df_2001.loc[:,"Type"].unique())
l_2001.sort()
print(l_2001,end=" ")
['Bankruptcy or Sudden change in Economic', 'By Consuming Insecticides', 'By Consuming Other Poison', 'By Drowning', 'By Fire-Arms', 'By Fire/Self Immolation', 'By Hanging', 'By Jumping from (Building)', 'By Jumping from (Other sites)', 'By Jumping off Moving Vehicles/Trains', 'By Machine', 'By Over Alcoholism', 'By Overdose of sleeping pills', 'By Self Infliction of injury', 'By coming under running vehicles/trains', 'By touching electric wires', 'Cancellation/Non-Settlement of Marriage', 'Cancer', 'Causes Not known', 'Death of Dear Person', 'Diploma', 'Divorce', 'Divorcee', 'Dowry Dispute', 'Drug Abuse/Addiction', 'Failure in Examination', 'Fall in Social Reputation', 'Family Problems', 'Farming/Agriculture Activity', 'Graduate', 'House Wife', 'Hr. Secondary/Intermediate/Pre-Universit', 'Ideological Causes/Hero Worshipping', 'Illegitimate Pregnancy', 'Illness (Aids/STD)', 'Insanity/Mental Illness', 'Love Affairs', 'Married', 'Matriculate/Secondary', 'Middle', 'Never Married', 'No Education', 'Not having Children(Barrenness/Impotency', 'Other Prolonged Illness', 'Others', 'Paralysis', 'Physical Abuse (Rape/Incest Etc.)', 'Post Graduate and Above', 'Poverty', 'Primary', 'Professional Activity', 'Professional/Career Problem', 'Property Dispute', 'Public Sector Undertaking', 'Retired Person', 'Self-employed (Business activity)', 'Seperated', 'Service (Government)', 'Service (Private)', 'Student', 'Suspected/Illicit Relation', 'Unemployed', 'Unemployment', 'Widowed/Widower'] 
In [188]:
cause_l_2001=[]
for i in l_2001:
    rough= np.sum(df_2001.where(df_2001["Type"]==i)["Total"])
    cause_l_2001.append(rough)

print(cause_l_2001,end=" ")
[2918.0, 21530.0, 20062.0, 8253.0, 395.0, 10822.0, 29757.0, 620.0, 728.0, 671.0, 217.0, 1291.0, 1088.0, 520.0, 3548.0, 1033.0, 924.0, 780.0, 20585.0, 871.0, 1199.0, 316.0, 1351.0, 2414.0, 1414.0, 2062.0, 1209.0, 24162.0, 16415.0, 1870.0, 21659.0, 6747.0, 104.0, 369.0, 741.0, 5858.0, 3114.0, 75123.0, 16384.0, 24910.0, 24063.0, 28725.0, 777.0, 15947.0, 53927.0, 772.0, 376.0, 604.0, 2549.0, 28067.0, 2612.0, 857.0, 1599.0, 2469.0, 884.0, 5275.0, 3044.0, 2293.0, 8981.0, 5474.0, 1200.0, 10252.0, 2734.0, 4925.0] 
In [189]:
x1_2001 = set(df_2001.loc[:,"State"])
x1_2001
len(x1_2001)
Out[189]:
35
In [190]:
cause_df_2001 = pd.DataFrame(cause_l_2001,l_2001)
cause_df_2001.reset_index()
Out[190]:
index 0
0 Bankruptcy or Sudden change in Economic 2918.0
1 By Consuming Insecticides 21530.0
2 By Consuming Other Poison 20062.0
3 By Drowning 8253.0
4 By Fire-Arms 395.0
... ... ...
59 Student 5474.0
60 Suspected/Illicit Relation 1200.0
61 Unemployed 10252.0
62 Unemployment 2734.0
63 Widowed/Widower 4925.0

64 rows × 2 columns

In [191]:
cause_df_2001.plot.bar(stacked=True,figsize=(50,20))
plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("Causes",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths due to Different Causes in 2001",fontsize=55)
plt.legend(["Death Count"], prop={"size":30})
Out[191]:
<matplotlib.legend.Legend at 0x10c41ce8>
In [192]:
s_2001=list(df_2001.loc[:,"State"].unique())
s_2001.sort()
print(s_2001,end=" ")
['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH', 'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR', 'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA', 'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA', 'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'] 
In [193]:
state_s_2001 = [s1_19,s1_20,s1_21,s1_22,s1_23,s1_24,s1_25,s1_26,s1_27,s1_28,s1_29,s1_30,s1_31,s1_32,s1_33,s1_34,
           s1_35,s1_36,s1_37,s1_38,s1_39,s1_40,s1_41,s1_42,s1_43,s1_44,s1_45,s1_46,s1_47,s1_48,s1_49,s1_50,
           s1_51,s1_52,s1_53]
print(state_s_2001,end=" ")
[645, 52610, 555, 13230, 3015, 350, 20051, 250, 69, 6195, 1280, 23955, 10031, 1535, 765, 1250, 59405, 47860, 0, 34300, 73090, 205, 435, 205, 200, 20254, 2645, 3240, 15975, 470, 56450, 4270, 17580, 1555, 68450] 
In [194]:
state_m_2001=[t_ANm_2001, t_APm_2001, t_ARPm_2001, t_ASm_2001, t_BHm_2001, t_CHm_2001, t_CTm_2001, t_DNm_2001,
             t_DDm_2001, t_DLm_2001, t_GOAm_2001, t_GJm_2001, t_HRm_2001, t_HPm_2001,t_JKm_2001, t_JHm_2001,
             t_KNm_2001, t_KERm_2001, t_LDm_2001,t_MPm_2001,t_MHm_2001,t_MNm_2001,t_MGm_2001,t_MZm_2001,
             t_NGm_2001, t_ODm_2001, t_PDm_2001,t_PBm_2001,t_RJm_2001,t_SMm_2001,t_TNm_2001,t_TPm_2001,
             t_UPm_2001, t_UKm_2001, t_WBm_2001]
print(state_m_2001,end=" ")
[395.0, 31895.0, 380.0, 9180.0, 1535.0, 195.0, 13200.0, 175.0, 49.0, 3650.0, 835.0, 13245.0, 6820.0, 885.0, 455.0, 705.0, 39355.0, 33935.0, 0.0, 17680.0, 46690.0, 120.0, 345.0, 230.0, 125.0, 10439.0, 1615.0, 1980.0, 9795.0, 310.0, 35640.0, 2315.0, 9005.0, 910.0, 37475.0] 
In [195]:
state_fm_2001=[t_ANfm_2001, t_APfm_2001, t_ARPfm_2001, t_ASfm_2001, t_BHfm_2001, t_CHfm_2001, t_CTfm_2001, t_DNfm_2001,
             t_DDfm_2001, t_DLfm_2001, t_GOAfm_2001, t_GJfm_2001, t_HRfm_2001, t_HPfm_2001,t_JKfm_2001, t_JHfm_2001,
             t_KNfm_2001, t_KERfm_2001, t_LDfm_2001,t_MPfm_2001,t_MHfm_2001,t_MNfm_2001,t_MGfm_2001,t_MZfm_2001,
             t_NGfm_2001, t_ODfm_2001, t_PDfm_2001,t_PBfm_2001,t_RJfm_2001,t_SMfm_2001,t_TNfm_2001,t_TPfm_2001,
             t_UPfm_2001, t_UKfm_2001, t_WBfm_2001]
print(state_fm_2001,end=" ")
[250.0, 20715.0, 175.0, 4050.0, 1480.0, 155.0, 6851.0, 75.0, 20.0, 2545.0, 445.0, 10710.0, 3211.0, 650.0, 310.0, 545.0, 20050.0, 13925.0, 0.0, 16620.0, 26400.0, 85.0, 90.0, 40.0, 75.0, 9815.0, 1030.0, 1260.0, 6180.0, 160.0, 20810.0, 1955.0, 8575.0, 645.0, 30975.0] 
In [196]:
df_state_2001 = {
    
    "State":['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH',
             'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR',
             'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA',
             'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA',
             'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'],
                   
    "Total":[s1_19,s1_20,s1_21,s1_22,s1_23,s1_24,s1_25,s1_26,s1_27,s1_28,s1_29,s1_30,s1_31,s1_32,s1_33,s1_34,
           s1_35,s1_36,s1_37,s1_38,s1_39,s1_40,s1_41,s1_42,s1_43,s1_44,s1_45,s1_46,s1_47,s1_48,s1_49,s1_50,
           s1_51,s1_52,s1_53],
       
    "Male":[t_ANm_2001, t_APm_2001, t_ARPm_2001, t_ASm_2001, t_BHm_2001, t_CHm_2001, t_CTm_2001, t_DNm_2001,
             t_DDm_2001, t_DLm_2001, t_GOAm_2001, t_GJm_2001, t_HRm_2001, t_HPm_2001,t_JKm_2001, t_JHm_2001,
             t_KNm_2001, t_KERm_2001, t_LDm_2001,t_MPm_2001,t_MHm_2001,t_MNm_2001,t_MGm_2001,t_MZm_2001,
             t_NGm_2001, t_ODm_2001, t_PDm_2001,t_PBm_2001,t_RJm_2001,t_SMm_2001,t_TNm_2001,t_TPm_2001,
             t_UPm_2001, t_UKm_2001, t_WBm_2001],
                 
    "Female":[t_ANfm_2001, t_APfm_2001, t_ARPfm_2001, t_ASfm_2001, t_BHfm_2001, t_CHfm_2001, t_CTfm_2001, t_DNfm_2001,
             t_DDfm_2001, t_DLfm_2001, t_GOAfm_2001, t_GJfm_2001, t_HRfm_2001, t_HPfm_2001,t_JKfm_2001, t_JHfm_2001,
             t_KNfm_2001, t_KERfm_2001, t_LDfm_2001,t_MPfm_2001,t_MHfm_2001,t_MNfm_2001,t_MGfm_2001,t_MZfm_2001,
             t_NGfm_2001, t_ODfm_2001, t_PDfm_2001,t_PBfm_2001,t_RJfm_2001,t_SMfm_2001,t_TNfm_2001,t_TPfm_2001,
             t_UPfm_2001, t_UKfm_2001, t_WBfm_2001]
                  

}

df_All_st_2001 = pd.DataFrame(df_state_2001)
df_All_st_2001
Out[196]:
State Total Male Female
0 A & N ISLANDS 645 395.0 250.0
1 ANDHRA PRADESH 52610 31895.0 20715.0
2 ARUNACHAL PRADESH 555 380.0 175.0
3 ASSAM 13230 9180.0 4050.0
4 BIHAR 3015 1535.0 1480.0
5 CHANDIGARH 350 195.0 155.0
6 CHHATTISGARH 20051 13200.0 6851.0
7 D & N HAVELI 250 175.0 75.0
8 DAMAN & DIU 69 49.0 20.0
9 DELHI (UT) 6195 3650.0 2545.0
10 GOA 1280 835.0 445.0
11 GUJARAT 23955 13245.0 10710.0
12 HARYANA 10031 6820.0 3211.0
13 HIMACHAL PRADESH 1535 885.0 650.0
14 JAMMU & KASHMIR 765 455.0 310.0
15 JHARKHAND 1250 705.0 545.0
16 KARNATAKA 59405 39355.0 20050.0
17 KERALA 47860 33935.0 13925.0
18 LAKSHADWEEP 0 0.0 0.0
19 MADHYA PRADESH 34300 17680.0 16620.0
20 MAHARASHTRA 73090 46690.0 26400.0
21 MANIPUR 205 120.0 85.0
22 MEGHALAYA 435 345.0 90.0
23 MIZORAM 205 230.0 40.0
24 NAGALAND 200 125.0 75.0
25 ODISHA 20254 10439.0 9815.0
26 PUDUCHERRY 2645 1615.0 1030.0
27 PUNJAB 3240 1980.0 1260.0
28 RAJASTHAN 15975 9795.0 6180.0
29 SIKKIM 470 310.0 160.0
30 TAMIL NADU 56450 35640.0 20810.0
31 TRIPURA 4270 2315.0 1955.0
32 UTTAR PRADESH 17580 9005.0 8575.0
33 UTTARAKHAND 1555 910.0 645.0
34 WEST BENGAL 68450 37475.0 30975.0
In [197]:
pivot_2001 = pd.pivot_table(df_All_st_2001, values=None, index='State', columns=None,
                       fill_value=None, margins=False, dropna=True, margins_name='All', observed=False)

pivot_2001
Out[197]:
Female Male Total
State
A & N ISLANDS 250.0 395.0 645
ANDHRA PRADESH 20715.0 31895.0 52610
ARUNACHAL PRADESH 175.0 380.0 555
ASSAM 4050.0 9180.0 13230
BIHAR 1480.0 1535.0 3015
CHANDIGARH 155.0 195.0 350
CHHATTISGARH 6851.0 13200.0 20051
D & N HAVELI 75.0 175.0 250
DAMAN & DIU 20.0 49.0 69
DELHI (UT) 2545.0 3650.0 6195
GOA 445.0 835.0 1280
GUJARAT 10710.0 13245.0 23955
HARYANA 3211.0 6820.0 10031
HIMACHAL PRADESH 650.0 885.0 1535
JAMMU & KASHMIR 310.0 455.0 765
JHARKHAND 545.0 705.0 1250
KARNATAKA 20050.0 39355.0 59405
KERALA 13925.0 33935.0 47860
LAKSHADWEEP 0.0 0.0 0
MADHYA PRADESH 16620.0 17680.0 34300
MAHARASHTRA 26400.0 46690.0 73090
MANIPUR 85.0 120.0 205
MEGHALAYA 90.0 345.0 435
MIZORAM 40.0 230.0 205
NAGALAND 75.0 125.0 200
ODISHA 9815.0 10439.0 20254
PUDUCHERRY 1030.0 1615.0 2645
PUNJAB 1260.0 1980.0 3240
RAJASTHAN 6180.0 9795.0 15975
SIKKIM 160.0 310.0 470
TAMIL NADU 20810.0 35640.0 56450
TRIPURA 1955.0 2315.0 4270
UTTAR PRADESH 8575.0 9005.0 17580
UTTARAKHAND 645.0 910.0 1555
WEST BENGAL 30975.0 37475.0 68450
In [198]:
pivot_2001.plot(kind='bar',figsize=(60,30))

plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("States",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths of Males And Females In Different State",fontsize=55)
plt.legend(["Female","Male","Total"], prop={"size":30})

plt.show
Out[198]:
<function matplotlib.pyplot.show(close=None, block=None)>
In [199]:
cause_l_percent_2001=[]
for i in cause_l_2001:
    p=i/np.sum(cause_l_2001)
    avg_2001_cause=p*100
    cause_l_percent_2001.append(avg_2001_cause)

print(cause_l_percent_2001,end=" ")
[0.5379396799646043, 3.9691025735565226, 3.6984735638964676, 1.5214585944989307, 0.07281911363468771, 1.9950593614040262, 5.485768011208613, 0.11429835557849716, 0.1342083917115257, 0.12370031708576065, 0.040004424452474006, 0.23799867266425778, 0.20057517882162082, 0.09586313693680408, 0.6540815574072709, 0.19043580856868964, 0.17034142024924415, 0.14379470540520609, 3.794889757392523, 0.1605707543691468, 0.22103827151390018, 0.05825529090775016, 0.24905980384927365, 0.44502617801047123, 0.26067399159354027, 0.3801342083917115, 0.2228817933780695, 4.454317528205885, 3.026141140033921, 0.3447385885996608, 3.9928840056043065, 1.2438242017550327, 0.019172627387360815, 0.06802595678784751, 0.1366049701349458, 1.0799351080303812, 0.5740727085023228, 13.849089300199099, 3.0204262222549962, 4.592212963645749, 4.436066661750608, 5.2955165548263405, 0.1432416488459553, 2.939864316790797, 9.941560356905834, 0.14231988791387065, 0.06931642209276602, 0.11134872059582626, 0.46991372317675684, 5.174212816164, 0.4815279109210235, 0.15798982375930978, 0.2947791460806725, 0.4551655482634024, 0.16296733279256692, 0.9724577833493107, 0.5611680554531376, 0.42271956345402256, 1.6556669862104565, 1.00914386844628, 0.2212226237003171, 1.8899786151463756, 0.5040188776638891, 0.9079345181033847] 
In [200]:
np.max(cause_l_percent_2001) #Married
Out[200]:
13.849089300199099
In [201]:
np.min(cause_l_percent_2001)  #Ideological Causes/Hero Worshipping
Out[201]:
0.019172627387360815
In [202]:
state_s_2001_percent=[]
tot=np.sum(state_s_2001)
for i in state_s_2001:
    xy=i/tot
    avg_state_2001=xy*100
    state_s_2001_percent.append(avg_state_2001)

print(state_s_2001_percent,end=" ")
[0.11892141046324037, 9.69993085964508, 0.1023277252823231, 2.4392717215948374, 0.5558884535607282, 0.06453099792578935, 3.6968886840285777, 0.046093569946992395, 0.012721825305369902, 1.1421986632864716, 0.23599907812860105, 4.416685872320811, 1.849458400553123, 0.2830145194745333, 0.14104632403779674, 0.23046784973496198, 10.952754090804333, 8.824153030652223, 0.0, 6.324037796727357, 13.475916109702696, 0.03779672735653376, 0.08020281170776676, 0.03779672735653376, 0.03687485595759391, 3.734316662825536, 0.48766997003917956, 0.5973726665130215, 2.9453791196128143, 0.0866559115003457, 10.407928094030883, 0.78727817469463, 3.2412998386725054, 0.2867020050702927, 12.620419451486518] 
In [203]:
np.max(state_s_2001_percent) #Maharashtra
Out[203]:
13.475916109702696
In [204]:
np.min(state_s_2001_percent)  #Lakshdweep
Out[204]:
0.0
In [205]:
l_age_grp_2001=[s1_4,s1_5,s1_6,s1_7,s1_8,s1_54]
l_age_grp_2001
Out[205]:
[9010, 116655, 109344, 64737, 25682, 217012]
In [206]:
l_age_grp_2001_percent=[]
for i in l_age_grp_2001:
    yz=i/s1_1
    avg_2001_age_grp=yz*100
    l_age_grp_2001_percent.append(avg_2001_age_grp)
l_age_grp_2001_percent
Out[206]:
[1.6610131996165474,
 21.505604306467074,
 20.157805471572892,
 11.934407492072856,
 4.73453285155962,
 40.00663667871101]
In [207]:
np.max(l_age_grp_2001_percent)  #0-100+
Out[207]:
40.00663667871101
In [208]:
np.min(l_age_grp_2001_percent)  #0-14
Out[208]:
1.6610131996165474
In [209]:
total_male_percent_2001= (s1_2/s1_1)*100
total_male_percent_2001
Out[209]:
61.124363984956865
In [210]:
total_female_percent_2001= (s1_3/s1_1)*100
total_female_percent_2001
Out[210]:
38.875636015043135
In [211]:
l_mage_2001 = [s1_9,s1_11,s1_13,s1_15,s1_17,s1_56]    # male age group-wise deathcount
l_fmage_2001 = [s1_10,s1_12,s1_14,s1_16,s1_18,s1_55]  # female age group-wise deathcount
In [212]:
l_mage_2001
Out[212]:
[4488, 59942, 70509, 46224, 17772, 132628]
In [213]:
l_fmage_2001
Out[213]:
[4522, 56713, 38835, 18513, 7910, 84384]
In [214]:
age_m_pnt_2001 = []        #percentage of death count of each male age group 
for i in l_mage_2001:
    r1_2001= i/s1_2
    r1_2001=r1_2001*100
    age_m_pnt_2001.append(r1_2001)
age_m_pnt_2001                    # 2nd highest - 30-44
Out[214]:
[1.353588910704753,
 18.078615527064237,
 21.265641823725808,
 13.941241935921681,
 5.360067317523367,
 40.000844485060156]
In [215]:
age_fm_pnt_2001 = []        #percentage of death count of each female age group 
for i in l_fmage_2001:
    r2_2001= i/s1_3
    r2_2001=r2_2001*100
    age_fm_pnt_2001.append(r2_2001)
age_fm_pnt_2001                      # 2nd highest - 15-29
Out[215]:
[2.144378002342598,
 26.893876525178186,
 18.41594863356364,
 8.779051295304846,
 3.7510017688036155,
 40.01574377480711]

2002

In [216]:
df_2002 = suicide_df.loc[(suicide_df["Year"]==2002)]

df_2002
Out[216]:
State Year Type Gender Age_group Total
21 A & N ISLANDS 2002 Bankruptcy or Sudden change in Economic Status Male 60+ 0
22 A & N ISLANDS 2002 Cancellation/Non-Settlement of Marriage Male 30-44 0
23 A & N ISLANDS 2002 Death of Dear Person Male 0-14 0
24 A & N ISLANDS 2002 Ideological Causes/Hero Worshipping Male 30-44 0
25 A & N ISLANDS 2002 Illness (Aids/STD) Female 30-44 0
... ... ... ... ... ... ...
236394 WEST BENGAL 2002 By Over Alcoholism Female 60+ 0
236395 WEST BENGAL 2002 House Wife Female 15-29 925
236396 WEST BENGAL 2002 Others Male 60+ 91
236397 WEST BENGAL 2002 Retired Person Female 45-59 0
236398 WEST BENGAL 2002 Self-employed (Business activity) Male 30-44 232

19712 rows × 6 columns

In [217]:
t2002_dcount = df_2002.loc[:,"Total"]

s2_1 = np.sum(t2002_dcount)

s2_1
Out[217]:
551980
In [218]:
male_2002 = df_2002.loc[(df_2002["Gender"]=="Male")]

male_2002
Out[218]:
State Year Type Gender Age_group Total
21 A & N ISLANDS 2002 Bankruptcy or Sudden change in Economic Status Male 60+ 0
22 A & N ISLANDS 2002 Cancellation/Non-Settlement of Marriage Male 30-44 0
23 A & N ISLANDS 2002 Death of Dear Person Male 0-14 0
24 A & N ISLANDS 2002 Ideological Causes/Hero Worshipping Male 30-44 0
27 A & N ISLANDS 2002 Property Dispute Male 30-44 0
... ... ... ... ... ... ...
236390 WEST BENGAL 2002 By Drowning Male 60+ 13
236391 WEST BENGAL 2002 By Fire/Self Immolation Male 15-29 48
236392 WEST BENGAL 2002 By Fire-Arms Male 30-44 13
236396 WEST BENGAL 2002 Others Male 60+ 91
236398 WEST BENGAL 2002 Self-employed (Business activity) Male 30-44 232

9867 rows × 6 columns

In [219]:
m2002_count = male_2002.loc[:,"Total"]
s2_2 = np.sum(m2002_count)

s2_2
Out[219]:
346645
In [220]:
female_2002 = df_2002.loc[(df_2002["Gender"]=="Female")]

female_2002
Out[220]:
State Year Type Gender Age_group Total
25 A & N ISLANDS 2002 Illness (Aids/STD) Female 30-44 0
26 A & N ISLANDS 2002 Paralysis Female 60+ 0
29 A & N ISLANDS 2002 By coming under running vehicles/trains Female 15-29 0
30 A & N ISLANDS 2002 By Consuming Insecticides Female 30-44 0
32 A & N ISLANDS 2002 By Hanging Female 30-44 8
... ... ... ... ... ... ...
236389 WEST BENGAL 2002 By Consuming Insecticides Female 30-44 176
236393 WEST BENGAL 2002 By Over Alcoholism Female 15-29 0
236394 WEST BENGAL 2002 By Over Alcoholism Female 60+ 0
236395 WEST BENGAL 2002 House Wife Female 15-29 925
236397 WEST BENGAL 2002 Retired Person Female 45-59 0

9845 rows × 6 columns

In [221]:
fm2002_count = female_2002.loc[:,"Total"]
s2_3 = np.sum(fm2002_count)
s2_3
Out[221]:
205335
In [222]:
df_age_d014_2002 = df_2002.loc[(df_2002["Age_group"]=="0-14")]

df_age_d014_2002
Out[222]:
State Year Type Gender Age_group Total
23 A & N ISLANDS 2002 Death of Dear Person Male 0-14 0
31 A & N ISLANDS 2002 By Fire-Arms Male 0-14 0
99 A & N ISLANDS 2002 Paralysis Female 0-14 0
104 A & N ISLANDS 2002 By Self Infliction of injury Female 0-14 0
106 A & N ISLANDS 2002 Unemployed Female 0-14 0
... ... ... ... ... ... ...
235951 UTTAR PRADESH 2002 Others Female 0-14 4
235952 UTTAR PRADESH 2002 Public Sector Undertaking Male 0-14 0
236158 UTTARAKHAND 2002 Dowry Dispute Male 0-14 0
236160 UTTARAKHAND 2002 Ideological Causes/Hero Worshipping Male 0-14 0
236385 WEST BENGAL 2002 Paralysis Male 0-14 0

3751 rows × 6 columns

In [223]:
t_014_2002 = df_age_d014_2002.loc[:,"Total"]

s2_4 = np.sum(t_014_2002)
s2_4
Out[223]:
8632
In [224]:
df_age_d1529_2002 = df_2002.loc[(df_2002["Age_group"]=="15-29")]

df_age_d1529_2002
Out[224]:
State Year Type Gender Age_group Total
28 A & N ISLANDS 2002 Suspected/Illicit Relation Male 15-29 0
29 A & N ISLANDS 2002 By coming under running vehicles/trains Female 15-29 0
98 A & N ISLANDS 2002 Family Problems Female 15-29 11
105 A & N ISLANDS 2002 Student Male 15-29 3
177 A & N ISLANDS 2002 Bankruptcy or Sudden change in Economic Status Male 15-29 0
... ... ... ... ... ... ...
236167 UTTARAKHAND 2002 By Fire/Self Immolation Female 15-29 15
236384 WEST BENGAL 2002 Love Affairs Male 15-29 219
236391 WEST BENGAL 2002 By Fire/Self Immolation Male 15-29 48
236393 WEST BENGAL 2002 By Over Alcoholism Female 15-29 0
236395 WEST BENGAL 2002 House Wife Female 15-29 925

3765 rows × 6 columns

In [225]:
t_1529_2002 = df_age_d1529_2002.loc[:,"Total"]

s2_5 = np.sum(t_1529_2002)

s2_5
Out[225]:
117864
In [226]:
df_age_d3044_2002 = df_2002.loc[(df_2002["Age_group"]=="30-44")]

df_age_d3044_2002
Out[226]:
State Year Type Gender Age_group Total
22 A & N ISLANDS 2002 Cancellation/Non-Settlement of Marriage Male 30-44 0
24 A & N ISLANDS 2002 Ideological Causes/Hero Worshipping Male 30-44 0
25 A & N ISLANDS 2002 Illness (Aids/STD) Female 30-44 0
27 A & N ISLANDS 2002 Property Dispute Male 30-44 0
30 A & N ISLANDS 2002 By Consuming Insecticides Female 30-44 0
... ... ... ... ... ... ...
236170 UTTARAKHAND 2002 Professional Activity Male 30-44 1
236382 WEST BENGAL 2002 Cancellation/Non-Settlement of Marriage Male 30-44 45
236389 WEST BENGAL 2002 By Consuming Insecticides Female 30-44 176
236392 WEST BENGAL 2002 By Fire-Arms Male 30-44 13
236398 WEST BENGAL 2002 Self-employed (Business activity) Male 30-44 232

3768 rows × 6 columns

In [227]:
t_3044_2002 = df_age_d3044_2002.loc[:,"Total"]

s2_6 = np.sum(t_3044_2002)
s2_6
Out[227]:
112529
In [228]:
df_age_d4559_2002 = df_2002.loc[(df_2002["Age_group"]=="45-59")]

df_age_d4559_2002
Out[228]:
State Year Type Gender Age_group Total
33 A & N ISLANDS 2002 Others Female 45-59 0
36 A & N ISLANDS 2002 Farming/Agriculture Activity Female 45-59 0
100 A & N ISLANDS 2002 Poverty Male 45-59 0
101 A & N ISLANDS 2002 Property Dispute Female 45-59 0
182 A & N ISLANDS 2002 Not having Children (Barrenness/Impotency Female 45-59 0
... ... ... ... ... ... ...
236383 WEST BENGAL 2002 Fall in Social Reputation Male 45-59 13
236386 WEST BENGAL 2002 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
236387 WEST BENGAL 2002 Professional/Career Problem Female 45-59 2
236388 WEST BENGAL 2002 Suspected/Illicit Relation Male 45-59 41
236397 WEST BENGAL 2002 Retired Person Female 45-59 0

3764 rows × 6 columns

In [229]:
t_4559_2002 = df_age_d4559_2002.loc[:,"Total"]

s2_7 = np.sum(t_4559_2002)

s2_7
Out[229]:
65482
In [230]:
df_age_d60_2002 = df_2002.loc[(df_2002["Age_group"]=="60+")]

df_age_d60_2002
Out[230]:
State Year Type Gender Age_group Total
21 A & N ISLANDS 2002 Bankruptcy or Sudden change in Economic Status Male 60+ 0
26 A & N ISLANDS 2002 Paralysis Female 60+ 0
35 A & N ISLANDS 2002 By Self Infliction of injury Female 60+ 0
103 A & N ISLANDS 2002 By Overdose of sleeping pills Male 60+ 0
181 A & N ISLANDS 2002 Ideological Causes/Hero Worshipping Male 60+ 0
... ... ... ... ... ... ...
235764 TRIPURA 2002 Unemployed Female 60+ 0
235943 UTTAR PRADESH 2002 Love Affairs Female 60+ 0
236390 WEST BENGAL 2002 By Drowning Male 60+ 13
236394 WEST BENGAL 2002 By Over Alcoholism Female 60+ 0
236396 WEST BENGAL 2002 Others Male 60+ 91

3754 rows × 6 columns

In [231]:
t_60_2002 = df_age_d60_2002.loc[:,"Total"]

s2_8 = np.sum(t_60_2002)
s2_8
Out[231]:
26639
In [232]:
df_age_d0100_2002 = df_2002.loc[(df_2002["Age_group"]=="0-100+")]

df_age_d0100_2002
Out[232]:
State Year Type Gender Age_group Total
107 A & N ISLANDS 2002 Never Married Female 0-100+ 17
266 A & N ISLANDS 2002 Diploma Female 0-100+ 0
349 A & N ISLANDS 2002 Divorcee Male 0-100+ 0
420 A & N ISLANDS 2002 Middle Female 0-100+ 45
516 A & N ISLANDS 2002 Seperated Female 0-100+ 0
... ... ... ... ... ... ...
235092 RAJASTHAN 2002 Diploma Female 0-100+ 8
235300 SIKKIM 2002 Graduate Female 0-100+ 2
235318 SIKKIM 2002 Married Male 0-100+ 29
235544 TAMIL NADU 2002 Matriculate/Secondary Male 0-100+ 754
235755 TRIPURA 2002 No Education Female 0-100+ 110

910 rows × 6 columns

In [233]:
t_0100_2002 = df_age_d0100_2002.loc[:,"Total"]

s2_54 = np.sum(t_0100_2002)
s2_54
Out[233]:
220834
In [234]:
df_014m_2002 = df_age_d014_2002.loc[(df_age_d014_2002["Gender"]=="Male")]
df_014m_2002
Out[234]:
State Year Type Gender Age_group Total
23 A & N ISLANDS 2002 Death of Dear Person Male 0-14 0
31 A & N ISLANDS 2002 By Fire-Arms Male 0-14 0
260 A & N ISLANDS 2002 Cancellation/Non-Settlement of Marriage Male 0-14 0
270 A & N ISLANDS 2002 By Machine Male 0-14 0
337 A & N ISLANDS 2002 Divorce Male 0-14 0
... ... ... ... ... ... ...
235761 TRIPURA 2002 Farming/Agriculture Activity Male 0-14 0
235952 UTTAR PRADESH 2002 Public Sector Undertaking Male 0-14 0
236158 UTTARAKHAND 2002 Dowry Dispute Male 0-14 0
236160 UTTARAKHAND 2002 Ideological Causes/Hero Worshipping Male 0-14 0
236385 WEST BENGAL 2002 Paralysis Male 0-14 0

1876 rows × 6 columns

In [235]:
t_014m_2002 = df_014m_2002.loc[:,"Total"]

s2_9 = np.sum(t_014m_2002)
s2_9
Out[235]:
3914
In [236]:
df_014fm_2002 = df_age_d014_2002.loc[(df_age_d014_2002["Gender"]=="Female")]
df_014fm_2002
Out[236]:
State Year Type Gender Age_group Total
99 A & N ISLANDS 2002 Paralysis Female 0-14 0
104 A & N ISLANDS 2002 By Self Infliction of injury Female 0-14 0
106 A & N ISLANDS 2002 Unemployed Female 0-14 0
178 A & N ISLANDS 2002 Causes Not known Female 0-14 0
264 A & N ISLANDS 2002 Insanity/Mental Illness Female 0-14 0
... ... ... ... ... ... ...
235306 SIKKIM 2002 By Jumping from (Other sites) Female 0-14 0
235307 SIKKIM 2002 By Over Alcoholism Female 0-14 0
235741 TRIPURA 2002 Cancellation/Non-Settlement of Marriage Female 0-14 0
235751 TRIPURA 2002 Physical Abuse (Rape/Incest Etc.) Female 0-14 0
235951 UTTAR PRADESH 2002 Others Female 0-14 4

1875 rows × 6 columns

In [237]:
t_014fm_2002 = df_014fm_2002.loc[:,"Total"]

s2_10 = np.sum(t_014fm_2002)
s2_10
Out[237]:
4718
In [238]:
df_1529m_2002 = df_age_d1529_2002.loc[(df_age_d1529_2002["Gender"]=="Male")]
df_1529m_2002
Out[238]:
State Year Type Gender Age_group Total
28 A & N ISLANDS 2002 Suspected/Illicit Relation Male 15-29 0
105 A & N ISLANDS 2002 Student Male 15-29 3
177 A & N ISLANDS 2002 Bankruptcy or Sudden change in Economic Status Male 15-29 0
275 A & N ISLANDS 2002 Unemployed Male 15-29 0
342 A & N ISLANDS 2002 Other Prolonged Illness Male 15-29 3
... ... ... ... ... ... ...
235754 TRIPURA 2002 Unemployment Male 15-29 2
235950 UTTAR PRADESH 2002 By touching electric wires Male 15-29 14
236159 UTTARAKHAND 2002 Dowry Dispute Male 15-29 0
236384 WEST BENGAL 2002 Love Affairs Male 15-29 219
236391 WEST BENGAL 2002 By Fire/Self Immolation Male 15-29 48

1884 rows × 6 columns

In [239]:
t_1529m_2002 = df_1529m_2002.loc[:,"Total"]

s2_11 = np.sum(t_1529m_2002)
s2_11
Out[239]:
62751
In [240]:
df_1529fm_2002 = df_age_d1529_2002.loc[(df_age_d1529_2002["Gender"]=="Female")]
df_1529fm_2002
Out[240]:
State Year Type Gender Age_group Total
29 A & N ISLANDS 2002 By coming under running vehicles/trains Female 15-29 0
98 A & N ISLANDS 2002 Family Problems Female 15-29 11
188 A & N ISLANDS 2002 By Jumping from (Other sites) Female 15-29 0
192 A & N ISLANDS 2002 By touching electric wires Female 15-29 0
263 A & N ISLANDS 2002 Fall in Social Reputation Female 15-29 0
... ... ... ... ... ... ...
235947 UTTAR PRADESH 2002 By Machine Female 15-29 1
236166 UTTARAKHAND 2002 By Drowning Female 15-29 5
236167 UTTARAKHAND 2002 By Fire/Self Immolation Female 15-29 15
236393 WEST BENGAL 2002 By Over Alcoholism Female 15-29 0
236395 WEST BENGAL 2002 House Wife Female 15-29 925

1881 rows × 6 columns

In [241]:
t_1529fm_2002 = df_1529fm_2002.loc[:,"Total"]

s2_12 = np.sum(t_1529fm_2002)
s2_12
Out[241]:
55113
In [242]:
df_3044m_2002 = df_age_d3044_2002.loc[(df_age_d3044_2002["Gender"]=="Male")]
df_3044m_2002
Out[242]:
State Year Type Gender Age_group Total
22 A & N ISLANDS 2002 Cancellation/Non-Settlement of Marriage Male 30-44 0
24 A & N ISLANDS 2002 Ideological Causes/Hero Worshipping Male 30-44 0
27 A & N ISLANDS 2002 Property Dispute Male 30-44 0
34 A & N ISLANDS 2002 Others Male 30-44 0
37 A & N ISLANDS 2002 Farming/Agriculture Activity Male 30-44 3
... ... ... ... ... ... ...
236161 UTTARAKHAND 2002 Illegitimate Pregnancy Male 30-44 0
236170 UTTARAKHAND 2002 Professional Activity Male 30-44 1
236382 WEST BENGAL 2002 Cancellation/Non-Settlement of Marriage Male 30-44 45
236392 WEST BENGAL 2002 By Fire-Arms Male 30-44 13
236398 WEST BENGAL 2002 Self-employed (Business activity) Male 30-44 232

1886 rows × 6 columns

In [243]:
t_3044m_2002 = df_3044m_2002.loc[:,"Total"]

s2_13 = np.sum(t_3044m_2002)
s2_13
Out[243]:
74426
In [244]:
df_3044fm_2002 = df_age_d3044_2002.loc[(df_age_d3044_2002["Gender"]=="Female")]
df_3044fm_2002
Out[244]:
State Year Type Gender Age_group Total
25 A & N ISLANDS 2002 Illness (Aids/STD) Female 30-44 0
30 A & N ISLANDS 2002 By Consuming Insecticides Female 30-44 0
32 A & N ISLANDS 2002 By Hanging Female 30-44 8
39 A & N ISLANDS 2002 Service (Government) Female 30-44 1
179 A & N ISLANDS 2002 Dowry Dispute Female 30-44 0
... ... ... ... ... ... ...
235762 TRIPURA 2002 Student Female 30-44 6
235945 UTTAR PRADESH 2002 Paralysis Female 30-44 0
235948 UTTAR PRADESH 2002 By Overdose of sleeping pills Female 30-44 3
235949 UTTAR PRADESH 2002 By Self Infliction of injury Female 30-44 3
236389 WEST BENGAL 2002 By Consuming Insecticides Female 30-44 176

1882 rows × 6 columns

In [245]:
t_3044fm_2002 = df_3044fm_2002.loc[:,"Total"]

s2_14 = np.sum(t_3044fm_2002)
s2_14
Out[245]:
38103
In [246]:
df_4559m_2002 = df_age_d4559_2002.loc[(df_age_d4559_2002["Gender"]=="Male")]
df_4559m_2002
Out[246]:
State Year Type Gender Age_group Total
100 A & N ISLANDS 2002 Poverty Male 45-59 0
269 A & N ISLANDS 2002 By Hanging Male 45-59 17
422 A & N ISLANDS 2002 By Fire-Arms Male 45-59 0
425 A & N ISLANDS 2002 By Overdose of sleeping pills Male 45-59 0
515 A & N ISLANDS 2002 Public Sector Undertaking Male 45-59 0
... ... ... ... ... ... ...
236163 UTTARAKHAND 2002 Unemployment Male 45-59 0
236164 UTTARAKHAND 2002 By Consuming Insecticides Male 45-59 11
236169 UTTARAKHAND 2002 By Jumping off Moving Vehicles/Trains Male 45-59 0
236383 WEST BENGAL 2002 Fall in Social Reputation Male 45-59 13
236388 WEST BENGAL 2002 Suspected/Illicit Relation Male 45-59 41

1885 rows × 6 columns

In [247]:
t_4559m_2002 = df_4559m_2002.loc[:,"Total"]

s2_15 = np.sum(t_4559m_2002)
s2_15
Out[247]:
47862
In [248]:
df_4559fm_2002 = df_age_d4559_2002.loc[(df_age_d4559_2002["Gender"]=="Female")]
df_4559fm_2002
Out[248]:
State Year Type Gender Age_group Total
33 A & N ISLANDS 2002 Others Female 45-59 0
36 A & N ISLANDS 2002 Farming/Agriculture Activity Female 45-59 0
101 A & N ISLANDS 2002 Property Dispute Female 45-59 0
182 A & N ISLANDS 2002 Not having Children (Barrenness/Impotency Female 45-59 0
183 A & N ISLANDS 2002 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
... ... ... ... ... ... ...
236165 UTTARAKHAND 2002 By Consuming Other Poison Female 45-59 0
236168 UTTARAKHAND 2002 By Jumping from (Building) Female 45-59 0
236386 WEST BENGAL 2002 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
236387 WEST BENGAL 2002 Professional/Career Problem Female 45-59 2
236397 WEST BENGAL 2002 Retired Person Female 45-59 0

1879 rows × 6 columns

In [249]:
t_4559fm_2002 = df_4559fm_2002.loc[:,"Total"]

s2_16 = np.sum(t_4559fm_2002)
s2_16
Out[249]:
17620
In [250]:
df_60m_2002 = df_age_d60_2002.loc[(df_age_d60_2002["Gender"]=="Male")]
df_60m_2002
Out[250]:
State Year Type Gender Age_group Total
21 A & N ISLANDS 2002 Bankruptcy or Sudden change in Economic Status Male 60+ 0
103 A & N ISLANDS 2002 By Overdose of sleeping pills Male 60+ 0
181 A & N ISLANDS 2002 Ideological Causes/Hero Worshipping Male 60+ 0
185 A & N ISLANDS 2002 By Consuming Insecticides Male 60+ 0
191 A & N ISLANDS 2002 By Self Infliction of injury Male 60+ 0
... ... ... ... ... ... ...
235541 TAMIL NADU 2002 Illness (Aids/STD) Male 60+ 0
235550 TAMIL NADU 2002 Public Sector Undertaking Male 60+ 7
235744 TRIPURA 2002 Failure in Examination Male 60+ 0
236390 WEST BENGAL 2002 By Drowning Male 60+ 13
236396 WEST BENGAL 2002 Others Male 60+ 91

1881 rows × 6 columns

In [251]:
t_60m_2002 = df_60m_2002.loc[:,"Total"]

s2_17 = np.sum(t_60m_2002)
s2_17
Out[251]:
19028
In [252]:
df_60fm_2002 = df_age_d60_2002.loc[(df_age_d60_2002["Gender"]=="Female")]
df_60fm_2002
Out[252]:
State Year Type Gender Age_group Total
26 A & N ISLANDS 2002 Paralysis Female 60+ 0
35 A & N ISLANDS 2002 By Self Infliction of injury Female 60+ 0
184 A & N ISLANDS 2002 Suspected/Illicit Relation Female 60+ 0
187 A & N ISLANDS 2002 By Hanging Female 60+ 1
267 A & N ISLANDS 2002 By Consuming Other Poison Female 60+ 1
... ... ... ... ... ... ...
235746 TRIPURA 2002 Family Problems Female 60+ 2
235763 TRIPURA 2002 Student Female 60+ 0
235764 TRIPURA 2002 Unemployed Female 60+ 0
235943 UTTAR PRADESH 2002 Love Affairs Female 60+ 0
236394 WEST BENGAL 2002 By Over Alcoholism Female 60+ 0

1873 rows × 6 columns

In [253]:
t_60fm_2002 = df_60fm_2002.loc[:,"Total"]

s2_18 = np.sum(t_60fm_2002)
s2_18
Out[253]:
7611
In [254]:
df_0100fm_2002 = df_age_d0100_2002.loc[(df_age_d0100_2002["Gender"]=="Female")]
df_0100fm_2002
Out[254]:
State Year Type Gender Age_group Total
107 A & N ISLANDS 2002 Never Married Female 0-100+ 17
266 A & N ISLANDS 2002 Diploma Female 0-100+ 0
420 A & N ISLANDS 2002 Middle Female 0-100+ 45
516 A & N ISLANDS 2002 Seperated Female 0-100+ 0
579 A & N ISLANDS 2002 No Education Female 0-100+ 0
... ... ... ... ... ... ...
234686 PUDUCHERRY 2002 Graduate Female 0-100+ 4
234687 PUDUCHERRY 2002 Hr. Secondary/Intermediate/Pre-Universit Female 0-100+ 10
235092 RAJASTHAN 2002 Diploma Female 0-100+ 8
235300 SIKKIM 2002 Graduate Female 0-100+ 2
235755 TRIPURA 2002 No Education Female 0-100+ 110

455 rows × 6 columns

In [255]:
t_0100fm_2002 = df_0100fm_2002.loc[:,"Total"]

s2_55 = np.sum(t_0100fm_2002)
s2_55
Out[255]:
82170
In [256]:
df_0100m_2002 = df_age_d0100_2002.loc[(df_age_d0100_2002["Gender"]=="Male")]
df_0100m_2002
Out[256]:
State Year Type Gender Age_group Total
349 A & N ISLANDS 2002 Divorcee Male 0-100+ 0
589 A & N ISLANDS 2002 Never Married Male 0-100+ 37
673 A & N ISLANDS 2002 Primary Male 0-100+ 15
917 A & N ISLANDS 2002 Middle Male 0-100+ 55
997 A & N ISLANDS 2002 Widowed/Widower Male 0-100+ 0
... ... ... ... ... ... ...
231059 DELHI (UT) 2002 Widowed/Widower Male 0-100+ 15
231959 HIMACHAL PRADESH 2002 Widowed/Widower Male 0-100+ 4
234049 MIZORAM 2002 Diploma Male 0-100+ 0
235318 SIKKIM 2002 Married Male 0-100+ 29
235544 TAMIL NADU 2002 Matriculate/Secondary Male 0-100+ 754

455 rows × 6 columns

In [257]:
t_0100m_2002 = df_0100m_2002.loc[:,"Total"]

s2_56 = np.sum(t_0100m_2002)
s2_56
Out[257]:
138664
In [258]:
df_st_AN_2002 = df_2002.loc[(df_2002["State"]=="A & N ISLANDS")]

df_st_AN_2002
Out[258]:
State Year Type Gender Age_group Total
21 A & N ISLANDS 2002 Bankruptcy or Sudden change in Economic Status Male 60+ 0
22 A & N ISLANDS 2002 Cancellation/Non-Settlement of Marriage Male 30-44 0
23 A & N ISLANDS 2002 Death of Dear Person Male 0-14 0
24 A & N ISLANDS 2002 Ideological Causes/Hero Worshipping Male 30-44 0
25 A & N ISLANDS 2002 Illness (Aids/STD) Female 30-44 0
... ... ... ... ... ... ...
5137 A & N ISLANDS 2002 By touching electric wires Female 30-44 0
5138 A & N ISLANDS 2002 Farming/Agriculture Activity Female 30-44 0
5139 A & N ISLANDS 2002 Others Male 60+ 0
5140 A & N ISLANDS 2002 Professional Activity Female 45-59 0
5141 A & N ISLANDS 2002 Widowed/Widower Female 0-100+ 0

557 rows × 6 columns

In [259]:
t_AN_2002 = df_st_AN_2002.loc[:,"Total"]

s2_19 = np.sum(t_AN_2002)
s2_19
Out[259]:
720
In [260]:
df_st_AP_2002 = df_2002.loc[(df_2002["State"]=="ANDHRA PRADESH")]

df_st_AP_2002
Out[260]:
State Year Type Gender Age_group Total
5007 ANDHRA PRADESH 2002 Fall in Social Reputation Female 60+ 0
5008 ANDHRA PRADESH 2002 Illness (Aids/STD) Female 45-59 10
5009 ANDHRA PRADESH 2002 Illness (Aids/STD) Male 15-29 47
5010 ANDHRA PRADESH 2002 Not having Children (Barrenness/Impotency Male 30-44 2
5011 ANDHRA PRADESH 2002 Others Female 15-29 332
... ... ... ... ... ... ...
229244 ANDHRA PRADESH 2002 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 496
229245 ANDHRA PRADESH 2002 By Fire/Self Immolation Male 15-29 123
229246 ANDHRA PRADESH 2002 By Fire-Arms Male 0-14 1
229247 ANDHRA PRADESH 2002 Service (Private) Female 30-44 24
229248 ANDHRA PRADESH 2002 Service (Private) Male 15-29 248

566 rows × 6 columns

In [261]:
t_AP_2002 = df_st_AP_2002.loc[:,"Total"]

s2_20 = np.sum(t_AP_2002)
s2_20
Out[261]:
58465
In [262]:
df_st_ARP_2002 = df_2002.loc[(df_2002["State"]=="ARUNACHAL PRADESH")]

df_st_ARP_2002
Out[262]:
State Year Type Gender Age_group Total
9897 ARUNACHAL PRADESH 2002 Drug Abuse/Addiction Female 30-44 0
9898 ARUNACHAL PRADESH 2002 Illness (Aids/STD) Female 45-59 0
9899 ARUNACHAL PRADESH 2002 Not having Children (Barrenness/Impotency Male 45-59 0
9900 ARUNACHAL PRADESH 2002 Other Prolonged Illness Female 0-14 0
9901 ARUNACHAL PRADESH 2002 Paralysis Female 45-59 0
... ... ... ... ... ... ...
229573 ARUNACHAL PRADESH 2002 By Overdose of sleeping pills Female 60+ 0
229574 ARUNACHAL PRADESH 2002 By Self Infliction of injury Female 15-29 0
229575 ARUNACHAL PRADESH 2002 By Self Infliction of injury Female 60+ 0
229576 ARUNACHAL PRADESH 2002 Retired Person Male 60+ 0
229577 ARUNACHAL PRADESH 2002 Student Male 0-14 1

556 rows × 6 columns

In [263]:
t_ARP_2002 = df_st_ARP_2002.loc[:,"Total"]

s2_21 = np.sum(t_ARP_2002)
s2_21
Out[263]:
570
In [264]:
df_st_AS_2002 = df_2002.loc[(df_2002["State"]=="ASSAM")]

df_st_AS_2002
Out[264]:
State Year Type Gender Age_group Total
16344 ASSAM 2002 Bankruptcy or Sudden change in Economic Status Female 0-14 0
16345 ASSAM 2002 Bankruptcy or Sudden change in Economic Status Female 30-44 1
16346 ASSAM 2002 Cancellation/Non-Settlement of Marriage Female 60+ 0
16347 ASSAM 2002 Divorce Male 45-59 5
16348 ASSAM 2002 Dowry Dispute Male 45-59 0
... ... ... ... ... ... ...
229768 ASSAM 2002 Others Male 60+ 17
229769 ASSAM 2002 Professional Activity Female 0-14 0
229770 ASSAM 2002 Service (Government) Female 0-14 0
229771 ASSAM 2002 Service (Private) Female 45-59 4
229772 ASSAM 2002 Unemployed Male 0-14 0

566 rows × 6 columns

In [265]:
t_AS_2002 = df_st_AS_2002.loc[:,"Total"]

s2_22 = np.sum(t_AS_2002)
s2_22
Out[265]:
12550
In [266]:
df_st_BH_2002 = df_2002.loc[(df_2002["State"]=="BIHAR")]

df_st_BH_2002
Out[266]:
State Year Type Gender Age_group Total
21979 BIHAR 2002 Bankruptcy or Sudden change in Economic Status Female 30-44 0
21980 BIHAR 2002 Death of Dear Person Female 45-59 1
21981 BIHAR 2002 Death of Dear Person Female 60+ 2
21982 BIHAR 2002 Divorce Female 45-59 1
21983 BIHAR 2002 Illegitimate Pregnancy Male 60+ 0
... ... ... ... ... ... ...
229973 BIHAR 2002 By Self Infliction of injury Male 30-44 4
229974 BIHAR 2002 By Self Infliction of injury Male 45-59 2
229975 BIHAR 2002 Farming/Agriculture Activity Female 60+ 0
229976 BIHAR 2002 House Wife Male 45-59 0
229977 BIHAR 2002 Public Sector Undertaking Female 45-59 0

566 rows × 6 columns

In [267]:
t_BH_2002 = df_st_BH_2002.loc[:,"Total"]

s2_23 = np.sum(t_BH_2002)
s2_23
Out[267]:
3600
In [268]:
df_st_CH_2002 = df_2002.loc[(df_2002["State"]=="CHANDIGARH")]

df_st_CH_2002
Out[268]:
State Year Type Gender Age_group Total
27336 CHANDIGARH 2002 Bankruptcy or Sudden change in Economic Status Female 30-44 0
27337 CHANDIGARH 2002 Death of Dear Person Male 60+ 0
27338 CHANDIGARH 2002 Failure in Examination Female 45-59 0
27339 CHANDIGARH 2002 Ideological Causes/Hero Worshipping Male 0-14 0
27340 CHANDIGARH 2002 Illegitimate Pregnancy Male 15-29 0
... ... ... ... ... ... ...
230207 CHANDIGARH 2002 Others Female 60+ 0
230208 CHANDIGARH 2002 Service (Private) Male 0-14 0
230209 CHANDIGARH 2002 Student Female 15-29 4
230210 CHANDIGARH 2002 Married Male 0-100+ 34
230211 CHANDIGARH 2002 Seperated Female 0-100+ 0

561 rows × 6 columns

In [269]:
t_CH_2002 = df_st_CH_2002.loc[:,"Total"]

s2_24 = np.sum(t_CH_2002)
s2_24
Out[269]:
435
In [270]:
df_st_CT_2002 = df_2002.loc[(df_2002["State"]=="CHHATTISGARH")]

df_st_CT_2002
Out[270]:
State Year Type Gender Age_group Total
35634 CHHATTISGARH 2002 Drug Abuse/Addiction Male 30-44 16
35635 CHHATTISGARH 2002 Family Problems Male 45-59 69
35636 CHHATTISGARH 2002 Not having Children (Barrenness/Impotency Male 45-59 1
35637 CHHATTISGARH 2002 Professional/Career Problem Female 45-59 0
35638 CHHATTISGARH 2002 Property Dispute Female 45-59 0
... ... ... ... ... ... ...
230440 CHHATTISGARH 2002 Retired Person Female 15-29 0
230441 CHHATTISGARH 2002 Retired Person Female 60+ 0
230442 CHHATTISGARH 2002 Student Female 60+ 0
230443 CHHATTISGARH 2002 Never Married Female 0-100+ 295
230444 CHHATTISGARH 2002 Widowed/Widower Female 0-100+ 67

566 rows × 6 columns

In [271]:
t_CT_2002 = df_st_CT_2002.loc[:,"Total"]

s2_25 = np.sum(t_CT_2002)
s2_25
Out[271]:
19750
In [272]:
df_st_DN_2002 = df_2002.loc[(df_2002["State"]=="D & N HAVELI")]

df_st_DN_2002
Out[272]:
State Year Type Gender Age_group Total
40716 D & N HAVELI 2002 Cancellation/Non-Settlement of Marriage Male 30-44 0
40717 D & N HAVELI 2002 Causes Not known Female 15-29 2
40718 D & N HAVELI 2002 Causes Not known Male 30-44 0
40719 D & N HAVELI 2002 Divorce Male 45-59 0
40720 D & N HAVELI 2002 Dowry Dispute Female 30-44 0
... ... ... ... ... ... ...
230644 D & N HAVELI 2002 By Consuming Other Poison Male 60+ 0
230645 D & N HAVELI 2002 By Jumping from (Building) Male 15-29 0
230646 D & N HAVELI 2002 By Jumping from (Building) Male 60+ 0
230647 D & N HAVELI 2002 By Jumping off Moving Vehicles/Trains Female 45-59 0
230648 D & N HAVELI 2002 Service (Private) Female 45-59 0

558 rows × 6 columns

In [273]:
t_DN_2002 = df_st_DN_2002.loc[:,"Total"]

s2_26 = np.sum(t_DN_2002)
s2_26
Out[273]:
250
In [274]:
df_st_DD_2002 = df_2002.loc[(df_2002["State"]=="DAMAN & DIU")]

df_st_DD_2002
Out[274]:
State Year Type Gender Age_group Total
47865 DAMAN & DIU 2002 Cancellation/Non-Settlement of Marriage Female 15-29 0
47866 DAMAN & DIU 2002 Cancer Female 30-44 0
47867 DAMAN & DIU 2002 Causes Not known Female 30-44 1
47868 DAMAN & DIU 2002 Death of Dear Person Female 0-14 0
47869 DAMAN & DIU 2002 Drug Abuse/Addiction Male 60+ 0
... ... ... ... ... ... ...
230855 DAMAN & DIU 2002 Public Sector Undertaking Male 0-14 0
230856 DAMAN & DIU 2002 Retired Person Male 30-44 0
230857 DAMAN & DIU 2002 Service (Private) Male 15-29 3
230858 DAMAN & DIU 2002 Service (Private) Male 60+ 0
230859 DAMAN & DIU 2002 Unemployed Male 30-44 1

559 rows × 6 columns

In [275]:
t_DD_2002 = df_st_DD_2002.loc[:,"Total"]

s2_27 = np.sum(t_DD_2002)
s2_27
Out[275]:
85
In [276]:
df_st_DL_2002 = df_2002.loc[(df_2002["State"]=="DELHI (UT)")]

df_st_DL_2002
Out[276]:
State Year Type Gender Age_group Total
52776 DELHI (UT) 2002 Dowry Dispute Female 30-44 15
52777 DELHI (UT) 2002 Fall in Social Reputation Male 30-44 1
52778 DELHI (UT) 2002 Not having Children (Barrenness/Impotency Female 0-14 0
52779 DELHI (UT) 2002 Not having Children (Barrenness/Impotency Female 30-44 2
53310 DELHI (UT) 2002 Bankruptcy or Sudden change in Economic Status Male 45-59 3
... ... ... ... ... ... ...
231055 DELHI (UT) 2002 Farming/Agriculture Activity Male 15-29 5
231056 DELHI (UT) 2002 Others Female 45-59 6
231057 DELHI (UT) 2002 Retired Person Female 45-59 0
231058 DELHI (UT) 2002 Seperated Female 0-100+ 14
231059 DELHI (UT) 2002 Widowed/Widower Male 0-100+ 15

565 rows × 6 columns

In [277]:
t_DL_2002 = df_st_DL_2002.loc[:,"Total"]

s2_28 = np.sum(t_DL_2002)
s2_28
Out[277]:
5265
In [278]:
df_st_GOA_2002 = df_2002.loc[(df_2002["State"]=="GOA")]

df_st_GOA_2002
Out[278]:
State Year Type Gender Age_group Total
58289 GOA 2002 Failure in Examination Female 30-44 0
58290 GOA 2002 Love Affairs Female 60+ 0
58291 GOA 2002 Love Affairs Male 60+ 0
58292 GOA 2002 Not having Children (Barrenness/Impotency Female 0-14 0
58293 GOA 2002 Poverty Female 30-44 0
... ... ... ... ... ... ...
231300 GOA 2002 By Fire/Self Immolation Female 60+ 0
231301 GOA 2002 By Hanging Male 45-59 21
231302 GOA 2002 By Jumping from (Other sites) Female 60+ 1
231303 GOA 2002 By Overdose of sleeping pills Male 60+ 1
231304 GOA 2002 Service (Private) Female 0-14 0

563 rows × 6 columns

In [279]:
t_GOA_2002 = df_st_GOA_2002.loc[:,"Total"]

s2_29 = np.sum(t_GOA_2002)
s2_29
Out[279]:
1545
In [280]:
df_st_GJ_2002 = df_2002.loc[(df_2002["State"]=="GUJARAT")]

df_st_GJ_2002
Out[280]:
State Year Type Gender Age_group Total
63228 GUJARAT 2002 Bankruptcy or Sudden change in Economic Status Male 30-44 62
63229 GUJARAT 2002 Cancellation/Non-Settlement of Marriage Male 0-14 0
63230 GUJARAT 2002 Death of Dear Person Female 15-29 8
63231 GUJARAT 2002 Failure in Examination Female 45-59 0
63232 GUJARAT 2002 Failure in Examination Male 30-44 3
... ... ... ... ... ... ...
231517 GUJARAT 2002 By Consuming Insecticides Female 45-59 58
231518 GUJARAT 2002 By Jumping off Moving Vehicles/Trains Male 45-59 2
231519 GUJARAT 2002 By touching electric wires Female 30-44 0
231520 GUJARAT 2002 Others Female 30-44 17
231521 GUJARAT 2002 Service (Government) Male 15-29 10

565 rows × 6 columns

In [281]:
t_GJ_2002 = df_st_GJ_2002.loc[:,"Total"]

s2_30 = np.sum(t_GJ_2002)
s2_30
Out[281]:
23216
In [282]:
df_st_HR_2002 = df_2002.loc[(df_2002["State"]=="HARYANA")]

df_st_HR_2002
Out[282]:
State Year Type Gender Age_group Total
71169 HARYANA 2002 Insanity/Mental Illness Female 0-14 0
71170 HARYANA 2002 Property Dispute Female 45-59 0
71171 HARYANA 2002 No Education Female 0-100+ 164
71172 HARYANA 2002 By Consuming Other Poison Male 0-14 5
71173 HARYANA 2002 By Hanging Female 15-29 37
... ... ... ... ... ... ...
231722 HARYANA 2002 Others Male 15-29 128
231723 HARYANA 2002 Public Sector Undertaking Male 30-44 34
231724 HARYANA 2002 Service (Private) Female 15-29 26
231725 HARYANA 2002 Service (Private) Male 15-29 66
231726 HARYANA 2002 Student Female 45-59 0

566 rows × 6 columns

In [283]:
t_HR_2002 = df_st_HR_2002.loc[:,"Total"]

s2_31 = np.sum(t_HR_2002)
s2_31
Out[283]:
11000
In [284]:
df_st_HP_2002 = df_2002.loc[(df_2002["State"]=="HIMACHAL PRADESH")]

df_st_HP_2002
Out[284]:
State Year Type Gender Age_group Total
77180 HIMACHAL PRADESH 2002 Bankruptcy or Sudden change in Economic Status Male 15-29 2
77181 HIMACHAL PRADESH 2002 Cancellation/Non-Settlement of Marriage Female 45-59 0
77182 HIMACHAL PRADESH 2002 Fall in Social Reputation Male 15-29 0
77183 HIMACHAL PRADESH 2002 Fall in Social Reputation Male 30-44 0
77184 HIMACHAL PRADESH 2002 Illness (Aids/STD) Female 0-14 0
... ... ... ... ... ... ...
231955 HIMACHAL PRADESH 2002 House Wife Female 45-59 5
231956 HIMACHAL PRADESH 2002 Others Female 30-44 0
231957 HIMACHAL PRADESH 2002 Service (Government) Male 0-14 0
231958 HIMACHAL PRADESH 2002 Seperated Female 0-100+ 0
231959 HIMACHAL PRADESH 2002 Widowed/Widower Male 0-100+ 4

564 rows × 6 columns

In [285]:
t_HP_2002 = df_st_HP_2002.loc[:,"Total"]

s2_32 = np.sum(t_HP_2002)
s2_32
Out[285]:
1670
In [286]:
df_st_JK_2002 = df_2002.loc[(df_2002["State"]=="JAMMU & KASHMIR")]

df_st_JK_2002
Out[286]:
State Year Type Gender Age_group Total
83804 JAMMU & KASHMIR 2002 Dowry Dispute Male 60+ 0
83805 JAMMU & KASHMIR 2002 Drug Abuse/Addiction Male 45-59 0
83806 JAMMU & KASHMIR 2002 Not having Children (Barrenness/Impotency Female 60+ 0
83807 JAMMU & KASHMIR 2002 Poverty Female 0-14 0
83808 JAMMU & KASHMIR 2002 Professional/Career Problem Male 45-59 0
... ... ... ... ... ... ...
232179 JAMMU & KASHMIR 2002 By Jumping from (Building) Male 15-29 3
232180 JAMMU & KASHMIR 2002 By Jumping from (Building) Male 60+ 0
232181 JAMMU & KASHMIR 2002 By Jumping off Moving Vehicles/Trains Female 45-59 0
232182 JAMMU & KASHMIR 2002 By Machine Male 30-44 1
232183 JAMMU & KASHMIR 2002 Never Married Female 0-100+ 18

562 rows × 6 columns

In [287]:
t_JK_2002 = df_st_JK_2002.loc[:,"Total"]

s2_33 = np.sum(t_JK_2002)
s2_33
Out[287]:
919
In [288]:
df_st_JH_2002 = df_2002.loc[(df_2002["State"]=="JHARKHAND")]

df_st_JH_2002
Out[288]:
State Year Type Gender Age_group Total
89451 JHARKHAND 2002 Death of Dear Person Female 30-44 0
89452 JHARKHAND 2002 Drug Abuse/Addiction Male 15-29 0
89453 JHARKHAND 2002 Not having Children (Barrenness/Impotency Female 30-44 0
89454 JHARKHAND 2002 Paralysis Male 0-14 0
89455 JHARKHAND 2002 Suspected/Illicit Relation Female 30-44 0
... ... ... ... ... ... ...
232401 JHARKHAND 2002 Others Male 0-14 0
232402 JHARKHAND 2002 Farming/Agriculture Activity Male 0-14 0
232403 JHARKHAND 2002 Professional Activity Male 30-44 1
232404 JHARKHAND 2002 Student Female 30-44 0
232405 JHARKHAND 2002 Unemployed Female 60+ 0

565 rows × 6 columns

In [289]:
t_JH_2002 = df_st_JH_2002.loc[:,"Total"]

s2_34 = np.sum(t_JH_2002)
s2_34
Out[289]:
1360
In [290]:
df_st_KN_2002 = df_2002.loc[(df_2002["State"]=="KARNATAKA")]

df_st_KN_2002
Out[290]:
State Year Type Gender Age_group Total
96635 KARNATAKA 2002 Cancer Male 45-59 16
96636 KARNATAKA 2002 Cancer Male 60+ 6
96637 KARNATAKA 2002 Death of Dear Person Male 15-29 10
96638 KARNATAKA 2002 Divorce Female 45-59 0
96639 KARNATAKA 2002 Divorce Male 15-29 0
... ... ... ... ... ... ...
232611 KARNATAKA 2002 Failure in Examination Female 30-44 0
232612 KARNATAKA 2002 Failure in Examination Female 60+ 0
232613 KARNATAKA 2002 Others Female 60+ 43
232614 KARNATAKA 2002 By Fire/Self Immolation Male 15-29 70
232615 KARNATAKA 2002 By Fire-Arms Female 15-29 8

566 rows × 6 columns

In [291]:
t_KN_2002 = df_st_KN_2002.loc[:,"Total"]

s2_35 = np.sum(t_KN_2002)
s2_35
Out[291]:
61350
In [292]:
df_st_KER_2002 = df_2002.loc[(df_2002["State"]=="KERALA")]

df_st_KER_2002
Out[292]:
State Year Type Gender Age_group Total
101502 KERALA 2002 Illness (Aids/STD) Male 30-44 2
101503 KERALA 2002 Insanity/Mental Illness Male 60+ 137
101504 KERALA 2002 Professional/Career Problem Female 45-59 2
101505 KERALA 2002 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 540
101506 KERALA 2002 By Hanging Female 15-29 256
... ... ... ... ... ... ...
232787 KERALA 2002 Farming/Agriculture Activity Female 60+ 24
232788 KERALA 2002 House Wife Female 60+ 245
232789 KERALA 2002 Professional Activity Female 30-44 10
232790 KERALA 2002 Self-employed (Business activity) Female 30-44 7
232791 KERALA 2002 Self-employed (Business activity) Male 60+ 84

566 rows × 6 columns

In [293]:
t_KER_2002 = df_st_KER_2002.loc[:,"Total"]

s2_36 = np.sum(t_KER_2002)
s2_36
Out[293]:
49050
In [294]:
df_st_LD_2002 = df_2002.loc[(df_2002["State"]=="LAKSHADWEEP")]

df_st_LD_2002
Out[294]:
State Year Type Gender Age_group Total
105984 LAKSHADWEEP 2002 Dowry Dispute Female 0-14 0
105985 LAKSHADWEEP 2002 Failure in Examination Male 30-44 0
105986 LAKSHADWEEP 2002 Ideological Causes/Hero Worshipping Female 0-14 0
105987 LAKSHADWEEP 2002 Ideological Causes/Hero Worshipping Male 0-14 0
105988 LAKSHADWEEP 2002 Illegitimate Pregnancy Male 15-29 0
... ... ... ... ... ... ...
233014 LAKSHADWEEP 2002 By Jumping from (Building) Male 45-59 0
233015 LAKSHADWEEP 2002 Farming/Agriculture Activity Male 15-29 0
233016 LAKSHADWEEP 2002 Others Female 60+ 0
233017 LAKSHADWEEP 2002 Retired Person Female 60+ 0
233018 LAKSHADWEEP 2002 Seperated Female 0-100+ 0

556 rows × 6 columns

In [295]:
t_LD_2002 = df_st_LD_2002.loc[:,"Total"]

s2_37 = np.sum(t_LD_2002)
s2_37
Out[295]:
0
In [296]:
df_st_MP_2002 = df_2002.loc[(df_2002["State"]=="MADHYA PRADESH")]

df_st_MP_2002
Out[296]:
State Year Type Gender Age_group Total
112229 MADHYA PRADESH 2002 Cancer Male 15-29 0
112230 MADHYA PRADESH 2002 Death of Dear Person Female 0-14 1
112231 MADHYA PRADESH 2002 Drug Abuse/Addiction Female 15-29 0
112232 MADHYA PRADESH 2002 Others Male 15-29 96
112233 MADHYA PRADESH 2002 Other Prolonged Illness Female 60+ 47
... ... ... ... ... ... ...
233240 MADHYA PRADESH 2002 By Consuming Other Poison Female 60+ 20
233241 MADHYA PRADESH 2002 By Jumping from (Other sites) Female 15-29 10
233242 MADHYA PRADESH 2002 Others Male 60+ 98
233243 MADHYA PRADESH 2002 Self-employed (Business activity) Male 30-44 101
233244 MADHYA PRADESH 2002 Unemployed Female 45-59 4

566 rows × 6 columns

In [297]:
t_MP_2002 = df_st_MP_2002.loc[:,"Total"]

s2_38 = np.sum(t_MP_2002)
s2_38
Out[297]:
34495
In [298]:
df_st_MH_2002 = df_2002.loc[(df_2002["State"]=="MAHARASHTRA")]

df_st_MH_2002
Out[298]:
State Year Type Gender Age_group Total
118736 MAHARASHTRA 2002 Dowry Dispute Female 45-59 0
118737 MAHARASHTRA 2002 Fall in Social Reputation Male 15-29 23
118738 MAHARASHTRA 2002 Ideological Causes/Hero Worshipping Female 45-59 0
118739 MAHARASHTRA 2002 Love Affairs Female 45-59 0
118740 MAHARASHTRA 2002 Love Affairs Male 30-44 23
... ... ... ... ... ... ...
233452 MAHARASHTRA 2002 By Jumping from (Other sites) Female 0-14 0
233453 MAHARASHTRA 2002 By Self Infliction of injury Female 45-59 2
233454 MAHARASHTRA 2002 House Wife Female 30-44 1091
233455 MAHARASHTRA 2002 Others Female 60+ 23
233456 MAHARASHTRA 2002 Public Sector Undertaking Male 60+ 0

566 rows × 6 columns

In [299]:
t_MH_2002 = df_st_MH_2002.loc[:,"Total"]

s2_39 = np.sum(t_MH_2002)
s2_39
Out[299]:
72645
In [300]:
df_st_MN_2002 = df_2002.loc[(df_2002["State"]=="MANIPUR")]

df_st_MN_2002
Out[300]:
State Year Type Gender Age_group Total
125178 MANIPUR 2002 Cancer Female 60+ 0
125179 MANIPUR 2002 Dowry Dispute Male 15-29 0
125180 MANIPUR 2002 Ideological Causes/Hero Worshipping Male 15-29 0
125181 MANIPUR 2002 Illness (Aids/STD) Female 15-29 0
125182 MANIPUR 2002 Love Affairs Male 15-29 0
... ... ... ... ... ... ...
233674 MANIPUR 2002 Suspected/Illicit Relation Female 15-29 0
233675 MANIPUR 2002 By Hanging Male 60+ 3
233676 MANIPUR 2002 Others Female 30-44 0
233677 MANIPUR 2002 By touching electric wires Male 0-14 0
233678 MANIPUR 2002 Service (Government) Female 45-59 0

558 rows × 6 columns

In [301]:
t_MN_2002 = df_st_MN_2002.loc[:,"Total"]

s2_40 = np.sum(t_MN_2002)
s2_40
Out[301]:
195
In [302]:
df_st_MG_2002 = df_2002.loc[(df_2002["State"]=="MEGHALAYA")]

df_st_MG_2002
Out[302]:
State Year Type Gender Age_group Total
130173 MEGHALAYA 2002 Causes Not known Male 30-44 12
130174 MEGHALAYA 2002 Drug Abuse/Addiction Female 60+ 0
130175 MEGHALAYA 2002 Failure in Examination Male 60+ 0
130176 MEGHALAYA 2002 Family Problems Female 30-44 2
130177 MEGHALAYA 2002 Illegitimate Pregnancy Male 0-14 0
... ... ... ... ... ... ...
233879 MEGHALAYA 2002 By Hanging Male 60+ 3
233880 MEGHALAYA 2002 By touching electric wires Male 0-14 0
233881 MEGHALAYA 2002 Others Male 30-44 4
233882 MEGHALAYA 2002 Service (Government) Female 45-59 0
233883 MEGHALAYA 2002 Service (Private) Male 15-29 1

561 rows × 6 columns

In [303]:
t_MG_2002 = df_st_MG_2002.loc[:,"Total"]

s2_41 = np.sum(t_MG_2002)
s2_41
Out[303]:
332
In [304]:
df_st_MZ_2002 = df_2002.loc[(df_2002["State"]=="MIZORAM")]

df_st_MZ_2002
Out[304]:
State Year Type Gender Age_group Total
135441 MIZORAM 2002 Cancellation/Non-Settlement of Marriage Female 0-14 0
135442 MIZORAM 2002 Cancellation/Non-Settlement of Marriage Male 0-14 0
135443 MIZORAM 2002 Causes Not known Female 0-14 0
135444 MIZORAM 2002 Drug Abuse/Addiction Male 30-44 0
135445 MIZORAM 2002 Failure in Examination Female 45-59 0
... ... ... ... ... ... ...
234053 MIZORAM 2002 By touching electric wires Female 60+ 0
234054 MIZORAM 2002 Others Male 15-29 3
234055 MIZORAM 2002 Professional Activity Male 30-44 0
234056 MIZORAM 2002 Self-employed (Business activity) Male 30-44 0
234057 MIZORAM 2002 Student Female 45-59 0

563 rows × 6 columns

In [305]:
t_MN_2002 = df_st_MN_2002.loc[:,"Total"]

s2_42 = np.sum(t_MN_2002)
s2_42
Out[305]:
195
In [306]:
df_st_NG_2002 = df_2002.loc[(df_2002["State"]=="NAGALAND")]

df_st_NG_2002
Out[306]:
State Year Type Gender Age_group Total
142250 NAGALAND 2002 Cancer Male 15-29 0
142251 NAGALAND 2002 Divorce Male 30-44 0
142252 NAGALAND 2002 Fall in Social Reputation Male 0-14 0
142253 NAGALAND 2002 Ideological Causes/Hero Worshipping Female 30-44 0
142254 NAGALAND 2002 Insanity/Mental Illness Female 15-29 0
... ... ... ... ... ... ...
234291 NAGALAND 2002 By Jumping from (Other sites) Male 60+ 0
234292 NAGALAND 2002 By Machine Female 15-29 0
234293 NAGALAND 2002 House Wife Female 60+ 0
234294 NAGALAND 2002 Others Male 45-59 0
234295 NAGALAND 2002 Unemployed Male 0-14 0

559 rows × 6 columns

In [307]:
t_NG_2002 = df_st_NG_2002.loc[:,"Total"]

s2_43 = np.sum(t_NG_2002)
s2_43
Out[307]:
135
In [308]:
df_st_OD_2002 = df_2002.loc[(df_2002["State"]=="ODISHA")]

df_st_OD_2002
Out[308]:
State Year Type Gender Age_group Total
147048 ODISHA 2002 Insanity/Mental Illness Female 0-14 0
147049 ODISHA 2002 Insanity/Mental Illness Female 15-29 15
147050 ODISHA 2002 By Consuming Other Poison Female 15-29 167
147051 ODISHA 2002 By Fire/Self Immolation Male 30-44 11
147052 ODISHA 2002 By Fire-Arms Male 45-59 2
... ... ... ... ... ... ...
234483 ODISHA 2002 By Hanging Male 45-59 151
234484 ODISHA 2002 By Jumping off Moving Vehicles/Trains Male 45-59 5
234485 ODISHA 2002 Others Male 15-29 244
234486 ODISHA 2002 Public Sector Undertaking Female 15-29 10
234487 ODISHA 2002 Retired Person Male 15-29 0

566 rows × 6 columns

In [309]:
t_OD_2002 = df_st_OD_2002.loc[:,"Total"]

s2_44 = np.sum(t_OD_2002)
s2_44
Out[309]:
21940
In [310]:
df_st_PD_2002 = df_2002.loc[(df_2002["State"]=="PUDUCHERRY")]

df_st_PD_2002
Out[310]:
State Year Type Gender Age_group Total
151432 PUDUCHERRY 2002 Causes Not known Female 30-44 2
151433 PUDUCHERRY 2002 Drug Abuse/Addiction Female 0-14 0
151434 PUDUCHERRY 2002 Failure in Examination Female 45-59 0
151435 PUDUCHERRY 2002 Illness (Aids/STD) Female 45-59 0
151436 PUDUCHERRY 2002 Insanity/Mental Illness Female 60+ 0
... ... ... ... ... ... ...
234697 PUDUCHERRY 2002 Others Female 30-44 0
234698 PUDUCHERRY 2002 Professional Activity Male 45-59 0
234699 PUDUCHERRY 2002 Public Sector Undertaking Male 30-44 5
234700 PUDUCHERRY 2002 Retired Person Female 30-44 0
234701 PUDUCHERRY 2002 Self-employed (Business activity) Male 15-29 2

560 rows × 6 columns

In [311]:
t_PD_2002 = df_st_PD_2002.loc[:,"Total"]

s2_45 = np.sum(t_PD_2002)
s2_45
Out[311]:
2835
In [312]:
df_st_PB_2002 = df_2002.loc[(df_2002["State"]=="PUNJAB")]

df_st_PB_2002
Out[312]:
State Year Type Gender Age_group Total
157820 PUNJAB 2002 Bankruptcy or Sudden change in Economic Status Female 0-14 0
157821 PUNJAB 2002 Bankruptcy or Sudden change in Economic Status Female 15-29 0
157822 PUNJAB 2002 Cancellation/Non-Settlement of Marriage Female 60+ 0
157823 PUNJAB 2002 Family Problems Female 0-14 0
157824 PUNJAB 2002 Not having Children (Barrenness/Impotency Male 60+ 0
... ... ... ... ... ... ...
234904 PUNJAB 2002 By Drowning Male 30-44 7
234905 PUNJAB 2002 By Fire/Self Immolation Female 15-29 12
234906 PUNJAB 2002 Farming/Agriculture Activity Female 0-14 0
234907 PUNJAB 2002 Self-employed (Business activity) Male 45-59 8
234908 PUNJAB 2002 Unemployed Female 30-44 0

564 rows × 6 columns

In [313]:
t_PB_2002 = df_st_PB_2002.loc[:,"Total"]

s2_46 = np.sum(t_PB_2002)
s2_46
Out[313]:
2535
In [314]:
df_st_RJ_2002 = df_2002.loc[(df_2002["State"]=="RAJASTHAN")]

df_st_RJ_2002
Out[314]:
State Year Type Gender Age_group Total
162323 RAJASTHAN 2002 Divorce Female 60+ 0
164589 RAJASTHAN 2002 Insanity/Mental Illness Female 30-44 32
164590 RAJASTHAN 2002 By Consuming Other Poison Female 0-14 1
164591 RAJASTHAN 2002 By Drowning Male 60+ 6
164592 RAJASTHAN 2002 By Jumping from (Building) Male 45-59 7
... ... ... ... ... ... ...
235103 RAJASTHAN 2002 House Wife Female 60+ 18
235104 RAJASTHAN 2002 Self-employed (Business activity) Female 30-44 5
235105 RAJASTHAN 2002 Self-employed (Business activity) Female 45-59 0
235106 RAJASTHAN 2002 Student Female 0-14 6
235107 RAJASTHAN 2002 Student Male 45-59 0

566 rows × 6 columns

In [315]:
t_RJ_2002 = df_st_RJ_2002.loc[:,"Total"]

s2_47 = np.sum(t_RJ_2002)
s2_47
Out[315]:
16240
In [316]:
df_st_SM_2002 = df_2002.loc[(df_2002["State"]=="SIKKIM")]

df_st_SM_2002
Out[316]:
State Year Type Gender Age_group Total
169231 SIKKIM 2002 Bankruptcy or Sudden change in Economic Status Female 30-44 0
169232 SIKKIM 2002 Divorce Male 0-14 0
169233 SIKKIM 2002 Failure in Examination Male 0-14 0
169234 SIKKIM 2002 Others Female 0-14 0
169235 SIKKIM 2002 Unemployment Male 45-59 1
... ... ... ... ... ... ...
235314 SIKKIM 2002 Public Sector Undertaking Male 30-44 0
235315 SIKKIM 2002 Self-employed (Business activity) Male 15-29 0
235316 SIKKIM 2002 Student Female 45-59 0
235317 SIKKIM 2002 Unemployed Female 60+ 2
235318 SIKKIM 2002 Married Male 0-100+ 29

563 rows × 6 columns

In [317]:
t_SM_2002 = df_st_SM_2002.loc[:,"Total"]

s2_48 = np.sum(t_SM_2002)
s2_48
Out[317]:
383
In [318]:
df_st_TN_2002 = df_2002.loc[(df_2002["State"]=="TAMIL NADU")]

df_st_TN_2002
Out[318]:
State Year Type Gender Age_group Total
173740 TAMIL NADU 2002 Insanity/Mental Illness Female 30-44 59
173741 TAMIL NADU 2002 Love Affairs Male 60+ 1
173742 TAMIL NADU 2002 Paralysis Male 45-59 8
173743 TAMIL NADU 2002 Suspected/Illicit Relation Female 60+ 2
173744 TAMIL NADU 2002 Post Graduate and Above Female 0-100+ 26
... ... ... ... ... ... ...
235550 TAMIL NADU 2002 Public Sector Undertaking Male 60+ 7
235551 TAMIL NADU 2002 Unemployed Female 15-29 125
235552 TAMIL NADU 2002 Unemployed Female 30-44 100
235553 TAMIL NADU 2002 Unemployed Female 60+ 9
235554 TAMIL NADU 2002 Unemployed Male 30-44 381

565 rows × 6 columns

In [319]:
t_TN_2002 = df_st_TN_2002.loc[:,"Total"]

s2_49 = np.sum(t_TN_2002)
s2_49
Out[319]:
56134
In [320]:
df_st_TP_2002 = df_2002.loc[(df_2002["State"]=="TRIPURA")]

df_st_TP_2002
Out[320]:
State Year Type Gender Age_group Total
179346 TRIPURA 2002 Fall in Social Reputation Female 60+ 0
179347 TRIPURA 2002 Insanity/Mental Illness Male 60+ 3
179348 TRIPURA 2002 Poverty Female 0-14 0
179349 TRIPURA 2002 Professional/Career Problem Male 45-59 3
179350 TRIPURA 2002 Middle Male 0-100+ 136
... ... ... ... ... ... ...
235760 TRIPURA 2002 By Self Infliction of injury Male 0-14 1
235761 TRIPURA 2002 Farming/Agriculture Activity Male 0-14 0
235762 TRIPURA 2002 Student Female 30-44 6
235763 TRIPURA 2002 Student Female 60+ 0
235764 TRIPURA 2002 Unemployed Female 60+ 0

565 rows × 6 columns

In [321]:
t_TP_2002 = df_st_TP_2002.loc[:,"Total"]

s2_50 = np.sum(t_TP_2002)
s2_50
Out[321]:
3891
In [322]:
df_st_UP_2002 = df_2002.loc[(df_2002["State"]=="UTTAR PRADESH")]

df_st_UP_2002
Out[322]:
State Year Type Gender Age_group Total
185556 UTTAR PRADESH 2002 Bankruptcy or Sudden change in Economic Status Male 15-29 13
185557 UTTAR PRADESH 2002 Causes Not known Male 45-59 123
185558 UTTAR PRADESH 2002 Drug Abuse/Addiction Female 15-29 2
185559 UTTAR PRADESH 2002 Ideological Causes/Hero Worshipping Female 15-29 0
185560 UTTAR PRADESH 2002 Not having Children (Barrenness/Impotency Male 0-14 0
... ... ... ... ... ... ...
235948 UTTAR PRADESH 2002 By Overdose of sleeping pills Female 30-44 3
235949 UTTAR PRADESH 2002 By Self Infliction of injury Female 30-44 3
235950 UTTAR PRADESH 2002 By touching electric wires Male 15-29 14
235951 UTTAR PRADESH 2002 Others Female 0-14 4
235952 UTTAR PRADESH 2002 Public Sector Undertaking Male 0-14 0

566 rows × 6 columns

In [323]:
t_UP_2002 = df_st_UP_2002.loc[:,"Total"]

s2_51 = np.sum(t_UP_2002)
s2_51
Out[323]:
21250
In [324]:
df_st_UK_2002 = df_2002.loc[(df_2002["State"]=="UTTARAKHAND")]

df_st_UK_2002
Out[324]:
State Year Type Gender Age_group Total
189946 UTTARAKHAND 2002 Love Affairs Male 60+ 0
189947 UTTARAKHAND 2002 Not having Children (Barrenness/Impotency Male 60+ 0
189948 UTTARAKHAND 2002 Paralysis Female 60+ 0
189949 UTTARAKHAND 2002 Poverty Male 0-14 0
189950 UTTARAKHAND 2002 Unemployment Male 0-14 0
... ... ... ... ... ... ...
236166 UTTARAKHAND 2002 By Drowning Female 15-29 5
236167 UTTARAKHAND 2002 By Fire/Self Immolation Female 15-29 15
236168 UTTARAKHAND 2002 By Jumping from (Building) Female 45-59 0
236169 UTTARAKHAND 2002 By Jumping off Moving Vehicles/Trains Male 45-59 0
236170 UTTARAKHAND 2002 Professional Activity Male 30-44 1

565 rows × 6 columns

In [325]:
t_UK_2002 = df_st_UK_2002.loc[:,"Total"]

s2_52 = np.sum(t_UK_2002)
s2_52
Out[325]:
1805
In [326]:
df_st_WB_2002 = df_2002.loc[(df_2002["State"]=="WEST BENGAL")]

df_st_WB_2002
Out[326]:
State Year Type Gender Age_group Total
195073 WEST BENGAL 2002 Cancer Female 30-44 35
195074 WEST BENGAL 2002 Divorce Female 0-14 0
195075 WEST BENGAL 2002 Dowry Dispute Female 45-59 21
195076 WEST BENGAL 2002 Other Prolonged Illness Male 30-44 114
195077 WEST BENGAL 2002 Physical Abuse (Rape/Incest Etc.) Male 60+ 0
... ... ... ... ... ... ...
236394 WEST BENGAL 2002 By Over Alcoholism Female 60+ 0
236395 WEST BENGAL 2002 House Wife Female 15-29 925
236396 WEST BENGAL 2002 Others Male 60+ 91
236397 WEST BENGAL 2002 Retired Person Female 45-59 0
236398 WEST BENGAL 2002 Self-employed (Business activity) Male 30-44 232

566 rows × 6 columns

In [327]:
t_WB_2002 = df_st_WB_2002.loc[:,"Total"]

s2_53 = np.sum(t_WB_2002)
s2_53
Out[327]:
65035
In [328]:
t_ANm_2002 = np.sum(df_st_AN_2002.where(df_st_AN_2002["Gender"]=="Male")["Total"])
t_ANm_2002
Out[328]:
455.0
In [329]:
t_ANfm_2002 = np.sum(df_st_AN_2002.where(df_st_AN_2002["Gender"]=="Female")["Total"])
t_ANfm_2002
Out[329]:
265.0
In [330]:
t_APm_2002 = np.sum(df_st_AP_2002.where(df_st_AP_2002["Gender"]=="Male")["Total"])
t_APm_2002
Out[330]:
37855.0
In [331]:
t_APfm_2002 = np.sum(df_st_AP_2002.where(df_st_AP_2002["Gender"]=="Female")["Total"])
t_APfm_2002
Out[331]:
20610.0
In [332]:
t_ARPm_2002 = np.sum(df_st_ARP_2002.where(df_st_ARP_2002["Gender"]=="Male")["Total"])
t_ARPm_2002
Out[332]:
355.0
In [333]:
t_ARPfm_2002 = np.sum(df_st_ARP_2002.where(df_st_ARP_2002["Gender"]=="Female")["Total"])
t_ARPfm_2002
Out[333]:
215.0
In [334]:
t_ASm_2002 = np.sum(df_st_AS_2002.where(df_st_AS_2002["Gender"]=="Male")["Total"])
t_ASm_2002
Out[334]:
8510.0
In [335]:
t_ASfm_2002 = np.sum(df_st_AS_2002.where(df_st_AS_2002["Gender"]=="Female")["Total"])
t_ASfm_2002
Out[335]:
4040.0
In [336]:
t_BHm_2002 = np.sum(df_st_BH_2002.where(df_st_BH_2002["Gender"]=="Male")["Total"])
t_BHm_2002
Out[336]:
2130.0
In [337]:
t_BHfm_2002 = np.sum(df_st_BH_2002.where(df_st_BH_2002["Gender"]=="Female")["Total"])
t_BHfm_2002
Out[337]:
1470.0
In [338]:
t_CHm_2002 = np.sum(df_st_CH_2002.where(df_st_CH_2002["Gender"]=="Male")["Total"])
t_CHm_2002
Out[338]:
265.0
In [339]:
t_CHfm_2002 = np.sum(df_st_CH_2002.where(df_st_CH_2002["Gender"]=="Female")["Total"])
t_CHfm_2002
Out[339]:
170.0
In [340]:
t_CTm_2002 = np.sum(df_st_CT_2002.where(df_st_CT_2002["Gender"]=="Male")["Total"])
t_CTm_2002
Out[340]:
13145.0
In [341]:
t_CTfm_2002 = np.sum(df_st_CT_2002.where(df_st_CT_2002["Gender"]=="Female")["Total"])
t_CTfm_2002
Out[341]:
6605.0
In [342]:
t_DNm_2002 = np.sum(df_st_DN_2002.where(df_st_DN_2002["Gender"]=="Male")["Total"])
t_DNm_2002
Out[342]:
160.0
In [343]:
t_DNfm_2002 = np.sum(df_st_DN_2002.where(df_st_DN_2002["Gender"]=="Female")["Total"])
t_DNfm_2002
Out[343]:
90.0
In [344]:
t_DDm_2002 = np.sum(df_st_DD_2002.where(df_st_DD_2002["Gender"]=="Male")["Total"])
t_DDm_2002
Out[344]:
75.0
In [345]:
t_DDfm_2002 = np.sum(df_st_DD_2002.where(df_st_DD_2002["Gender"]=="Female")["Total"])
t_DDfm_2002
Out[345]:
10.0
In [346]:
t_DLm_2002 = np.sum(df_st_DL_2002.where(df_st_DL_2002["Gender"]=="Male")["Total"])
t_DLm_2002
Out[346]:
3215.0
In [347]:
t_DLfm_2002 = np.sum(df_st_DL_2002.where(df_st_DL_2002["Gender"]=="Female")["Total"])
t_DLfm_2002
Out[347]:
2050.0
In [348]:
t_GOAm_2002 = np.sum(df_st_GOA_2002.where(df_st_GOA_2002["Gender"]=="Male")["Total"])
t_GOAm_2002
Out[348]:
1130.0
In [349]:
t_GOAfm_2002 = np.sum(df_st_GOA_2002.where(df_st_GOA_2002["Gender"]=="Female")["Total"])
t_GOAfm_2002
Out[349]:
415.0
In [350]:
t_GJm_2002 = np.sum(df_st_GJ_2002.where(df_st_GJ_2002["Gender"]=="Male")["Total"])
t_GJm_2002
Out[350]:
13530.0
In [351]:
t_GJfm_2002 = np.sum(df_st_GJ_2002.where(df_st_GJ_2002["Gender"]=="Female")["Total"])
t_GJfm_2002
Out[351]:
9686.0
In [352]:
t_HRm_2002 = np.sum(df_st_HR_2002.where(df_st_HR_2002["Gender"]=="Male")["Total"])
t_HRm_2002
Out[352]:
7850.0
In [353]:
t_HRfm_2002 = np.sum(df_st_HR_2002.where(df_st_HR_2002["Gender"]=="Female")["Total"])
t_HRfm_2002
Out[353]:
3150.0
In [354]:
t_HPm_2002 = np.sum(df_st_HP_2002.where(df_st_HP_2002["Gender"]=="Male")["Total"])
t_HPm_2002
Out[354]:
1040.0
In [355]:
t_HPfm_2002 = np.sum(df_st_HP_2002.where(df_st_HP_2002["Gender"]=="Female")["Total"])
t_HPfm_2002
Out[355]:
630.0
In [356]:
t_JKm_2002 = np.sum(df_st_JK_2002.where(df_st_JK_2002["Gender"]=="Male")["Total"])
t_JKm_2002
Out[356]:
479.0
In [357]:
t_JKfm_2002 = np.sum(df_st_JK_2002.where(df_st_JK_2002["Gender"]=="Female")["Total"])
t_JKfm_2002
Out[357]:
440.0
In [358]:
t_JHm_2002 = np.sum(df_st_JH_2002.where(df_st_JH_2002["Gender"]=="Male")["Total"])
t_JHm_2002
Out[358]:
765.0
In [359]:
t_JHfm_2002 = np.sum(df_st_JH_2002.where(df_st_JH_2002["Gender"]=="Female")["Total"])
t_JHfm_2002
Out[359]:
595.0
In [360]:
t_KNm_2002 = np.sum(df_st_KN_2002.where(df_st_KN_2002["Gender"]=="Male")["Total"])
t_KNm_2002
Out[360]:
40400.0
In [361]:
t_KNfm_2002 = np.sum(df_st_KN_2002.where(df_st_KN_2002["Gender"]=="Female")["Total"])
t_KNfm_2002
Out[361]:
20950.0
In [362]:
t_KERm_2002 = np.sum(df_st_KER_2002.where(df_st_KER_2002["Gender"]=="Male")["Total"])
t_KERm_2002
Out[362]:
35825.0
In [363]:
t_KERfm_2002 = np.sum(df_st_KER_2002.where(df_st_KER_2002["Gender"]=="Female")["Total"])
t_KERfm_2002
Out[363]:
13225.0
In [364]:
t_LDm_2002 = np.sum(df_st_LD_2002.where(df_st_LD_2002["Gender"]=="Male")["Total"])
t_LDm_2002
Out[364]:
0.0
In [365]:
t_LDfm_2002 = np.sum(df_st_LD_2002.where(df_st_LD_2002["Gender"]=="Female")["Total"])
t_LDfm_2002
Out[365]:
0.0
In [366]:
t_MPm_2002 = np.sum(df_st_MP_2002.where(df_st_MP_2002["Gender"]=="Male")["Total"])
t_MPm_2002
Out[366]:
17895.0
In [367]:
t_MPfm_2002 = np.sum(df_st_MP_2002.where(df_st_MP_2002["Gender"]=="Female")["Total"])
t_MPfm_2002
Out[367]:
16600.0
In [368]:
t_MHm_2002 = np.sum(df_st_MH_2002.where(df_st_MH_2002["Gender"]=="Male")["Total"])
t_MHm_2002
Out[368]:
47235.0
In [369]:
t_MHfm_2002 = np.sum(df_st_MH_2002.where(df_st_MH_2002["Gender"]=="Female")["Total"])
t_MHfm_2002
Out[369]:
25410.0
In [370]:
t_MNm_2002 = np.sum(df_st_MN_2002.where(df_st_MN_2002["Gender"]=="Male")["Total"])
t_MNm_2002
Out[370]:
150.0
In [371]:
t_MNfm_2002 = np.sum(df_st_MN_2002.where(df_st_MN_2002["Gender"]=="Female")["Total"])
t_MNfm_2002
Out[371]:
45.0
In [372]:
t_MGm_2002 = np.sum(df_st_MG_2002.where(df_st_MG_2002["Gender"]=="Male")["Total"])
t_MGm_2002
Out[372]:
242.0
In [373]:
t_MGfm_2002 = np.sum(df_st_MG_2002.where(df_st_MG_2002["Gender"]=="Female")["Total"])
t_MGfm_2002
Out[373]:
90.0
In [374]:
t_MZm_2002 = np.sum(df_st_MZ_2002.where(df_st_MZ_2002["Gender"]=="Male")["Total"])
t_MZm_2002
Out[374]:
280.0
In [375]:
t_MZfm_2002 = np.sum(df_st_MZ_2002.where(df_st_MZ_2002["Gender"]=="Female")["Total"])
t_MZfm_2002
Out[375]:
50.0
In [376]:
t_NGm_2002 = np.sum(df_st_NG_2002.where(df_st_NG_2002["Gender"]=="Male")["Total"])
t_NGm_2002
Out[376]:
95.0
In [377]:
t_NGfm_2002 = np.sum(df_st_NG_2002.where(df_st_NG_2002["Gender"]=="Female")["Total"])
t_MGfm_2002
Out[377]:
90.0
In [378]:
t_ODm_2002 = np.sum(df_st_OD_2002.where(df_st_OD_2002["Gender"]=="Male")["Total"])
t_ODm_2002
Out[378]:
13155.0
In [379]:
t_ODfm_2002 = np.sum(df_st_OD_2002.where(df_st_OD_2002["Gender"]=="Female")["Total"])
t_ODfm_2002
Out[379]:
8785.0
In [380]:
t_PDm_2002 = np.sum(df_st_PD_2002.where(df_st_PD_2002["Gender"]=="Male")["Total"])
t_PDm_2002
Out[380]:
2050.0
In [381]:
t_PDfm_2002 = np.sum(df_st_PD_2002.where(df_st_PD_2002["Gender"]=="Female")["Total"])
t_PDfm_2002
Out[381]:
785.0
In [382]:
t_PBm_2002 = np.sum(df_st_PB_2002.where(df_st_PB_2002["Gender"]=="Male")["Total"])
t_PBm_2002
Out[382]:
1985.0
In [383]:
t_PBfm_2002 = np.sum(df_st_PB_2002.where(df_st_PB_2002["Gender"]=="Female")["Total"])
t_PBfm_2002
Out[383]:
550.0
In [384]:
t_RJm_2002 = np.sum(df_st_RJ_2002.where(df_st_RJ_2002["Gender"]=="Male")["Total"])
t_RJm_2002
Out[384]:
10460.0
In [385]:
t_RJfm_2002 = np.sum(df_st_RJ_2002.where(df_st_RJ_2002["Gender"]=="Female")["Total"])
t_RJfm_2002
Out[385]:
5780.0
In [386]:
t_SMm_2002 = np.sum(df_st_SM_2002.where(df_st_SM_2002["Gender"]=="Male")["Total"])
t_SMm_2002
Out[386]:
263.0
In [387]:
t_SMfm_2002 = np.sum(df_st_SM_2002.where(df_st_SM_2002["Gender"]=="Female")["Total"])
t_SMfm_2002
Out[387]:
120.0
In [388]:
t_TNm_2002 = np.sum(df_st_TN_2002.where(df_st_TN_2002["Gender"]=="Male")["Total"])
t_TNm_2002
Out[388]:
34915.0
In [389]:
t_TNfm_2002 = np.sum(df_st_TN_2002.where(df_st_TN_2002["Gender"]=="Female")["Total"])
t_TNfm_2002
Out[389]:
21219.0
In [390]:
t_TPm_2002 = np.sum(df_st_TP_2002.where(df_st_TP_2002["Gender"]=="Male")["Total"])
t_TPm_2002
Out[390]:
2461.0
In [391]:
t_TPfm_2002 = np.sum(df_st_TP_2002.where(df_st_TP_2002["Gender"]=="Female")["Total"])
t_TPfm_2002
Out[391]:
1430.0
In [392]:
t_UPm_2002 = np.sum(df_st_UP_2002.where(df_st_UP_2002["Gender"]=="Male")["Total"])
t_UPm_2002
Out[392]:
11630.0
In [393]:
t_UPfm_2002 = np.sum(df_st_UP_2002.where(df_st_UP_2002["Gender"]=="Female")["Total"])
t_UPfm_2002
Out[393]:
9620.0
In [394]:
t_UKm_2002 = np.sum(df_st_UK_2002.where(df_st_UK_2002["Gender"]=="Male")["Total"])
t_UKm_2002
Out[394]:
1025.0
In [395]:
t_UKfm_2002 = np.sum(df_st_UK_2002.where(df_st_UK_2002["Gender"]=="Female")["Total"])
t_UKfm_2002
Out[395]:
780.0
In [396]:
t_WBm_2002 = np.sum(df_st_WB_2002.where(df_st_WB_2002["Gender"]=="Male")["Total"])
t_WBm_2002
Out[396]:
35620.0
In [397]:
t_WBfm_2002 = np.sum(df_st_WB_2002.where(df_st_WB_2002["Gender"]=="Female")["Total"])
t_WBfm_2002
Out[397]:
29415.0
In [398]:
l_2002=list(df_2002.loc[:,"Type"].unique())
l_2002.sort()
print(l_2002,end=" ")
['Bankruptcy or Sudden change in Economic Status', 'By Consuming Insecticides', 'By Consuming Other Poison', 'By Drowning', 'By Fire-Arms', 'By Fire/Self Immolation', 'By Hanging', 'By Jumping from (Building)', 'By Jumping from (Other sites)', 'By Jumping off Moving Vehicles/Trains', 'By Machine', 'By Over Alcoholism', 'By Overdose of sleeping pills', 'By Self Infliction of injury', 'By coming under running vehicles/trains', 'By touching electric wires', 'Cancellation/Non-Settlement of Marriage', 'Cancer', 'Causes Not known', 'Death of Dear Person', 'Diploma', 'Divorce', 'Divorcee', 'Dowry Dispute', 'Drug Abuse/Addiction', 'Failure in Examination', 'Fall in Social Reputation', 'Family Problems', 'Farming/Agriculture Activity', 'Graduate', 'House Wife', 'Hr. Secondary/Intermediate/Pre-Universit', 'Ideological Causes/Hero Worshipping', 'Illegitimate Pregnancy', 'Illness (Aids/STD)', 'Insanity/Mental Illness', 'Love Affairs', 'Married', 'Matriculate/Secondary', 'Middle', 'Never Married', 'No Education', 'Not having Children (Barrenness/Impotency', 'Other Prolonged Illness', 'Others', 'Paralysis', 'Physical Abuse (Rape/Incest Etc.)', 'Post Graduate and Above', 'Poverty', 'Primary', 'Professional Activity', 'Professional/Career Problem', 'Property Dispute', 'Public Sector Undertaking', 'Retired Person', 'Self-employed (Business activity)', 'Seperated', 'Service (Government)', 'Service (Private)', 'Student', 'Suspected/Illicit Relation', 'Unemployed', 'Unemployment', 'Widowed/Widower'] 
In [399]:
cause_l_2002=[]
for i in l_2002:
    rough= np.sum(df_2002.where(df_2002["Type"]==i)["Total"])
    cause_l_2002.append(rough)

print(cause_l_2002,end=" ")
[2655.0, 21414.0, 19605.0, 8150.0, 471.0, 10655.0, 31385.0, 686.0, 780.0, 580.0, 185.0, 1319.0, 940.0, 527.0, 3765.0, 717.0, 963.0, 894.0, 19706.0, 701.0, 1096.0, 348.0, 1359.0, 2410.0, 1709.0, 2250.0, 874.0, 25085.0, 17971.0, 1776.0, 22730.0, 7231.0, 87.0, 267.0, 688.0, 6440.0, 3101.0, 75345.0, 17940.0, 25482.0, 24251.0, 28442.0, 766.0, 17296.0, 55536.0, 648.0, 430.0, 418.0, 2448.0, 28032.0, 2477.0, 971.0, 1253.0, 2333.0, 863.0, 6124.0, 3111.0, 2210.0, 8591.0, 5355.0, 1358.0, 10180.0, 2249.0, 6351.0] 
In [400]:
x1_2002 = set(df_2002.loc[:,"State"])
x1_2002
len(x1_2002)
Out[400]:
35
In [401]:
cause_df_2002 = pd.DataFrame(cause_l_2002,l_2002)
cause_df_2002.reset_index()
Out[401]:
index 0
0 Bankruptcy or Sudden change in Economic Status 2655.0
1 By Consuming Insecticides 21414.0
2 By Consuming Other Poison 19605.0
3 By Drowning 8150.0
4 By Fire-Arms 471.0
... ... ...
59 Student 5355.0
60 Suspected/Illicit Relation 1358.0
61 Unemployed 10180.0
62 Unemployment 2249.0
63 Widowed/Widower 6351.0

64 rows × 2 columns

In [402]:
cause_df_2002.plot.bar(stacked=True,figsize=(50,20))
plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("Causes",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths due to Different Causes in 2002",fontsize=55)
plt.legend(["Death Count"], prop={"size":30})
Out[402]:
<matplotlib.legend.Legend at 0x5859e8>
In [403]:
s_2002=list(df_2002.loc[:,"State"].unique())
s_2002.sort()
print(s_2002,end=" ")
['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH', 'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR', 'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA', 'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA', 'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'] 
In [404]:
state_s_2002 = [s2_19,s2_20,s2_21,s2_22,s2_23,s2_24,s2_25,s2_26,s2_27,s2_28,s2_29,s2_30,s2_31,s2_32,s2_33,s2_34,
           s2_35,s2_36,s2_37,s2_38,s2_39,s2_40,s2_41,s2_42,s2_43,s2_44,s2_45,s2_46,s2_47,s2_48,s2_49,s2_50,
           s2_51,s2_52,s2_53]
print(state_s_2002,end=" ")
[720, 58465, 570, 12550, 3600, 435, 19750, 250, 85, 5265, 1545, 23216, 11000, 1670, 919, 1360, 61350, 49050, 0, 34495, 72645, 195, 332, 195, 135, 21940, 2835, 2535, 16240, 383, 56134, 3891, 21250, 1805, 65035] 
In [405]:
state_m_2002=[t_ANm_2002, t_APm_2002, t_ARPm_2002, t_ASm_2002, t_BHm_2002, t_CHm_2002, t_CTm_2002, t_DNm_2002,
             t_DDm_2002, t_DLm_2002, t_GOAm_2002, t_GJm_2002, t_HRm_2002, t_HPm_2002,t_JKm_2002, t_JHm_2002,
             t_KNm_2002, t_KERm_2002, t_LDm_2002,t_MPm_2002,t_MHm_2002,t_MNm_2002,t_MGm_2002,t_MZm_2002,
             t_NGm_2002, t_ODm_2002, t_PDm_2002,t_PBm_2002,t_RJm_2002,t_SMm_2002,t_TNm_2002,t_TPm_2002,
             t_UPm_2002, t_UKm_2002, t_WBm_2002]
print(state_m_2002,end=" ")
[455.0, 37855.0, 355.0, 8510.0, 2130.0, 265.0, 13145.0, 160.0, 75.0, 3215.0, 1130.0, 13530.0, 7850.0, 1040.0, 479.0, 765.0, 40400.0, 35825.0, 0.0, 17895.0, 47235.0, 150.0, 242.0, 280.0, 95.0, 13155.0, 2050.0, 1985.0, 10460.0, 263.0, 34915.0, 2461.0, 11630.0, 1025.0, 35620.0] 
In [406]:
state_fm_2002=[t_ANfm_2002, t_APfm_2002, t_ARPfm_2002, t_ASfm_2002, t_BHfm_2002, t_CHfm_2002, t_CTfm_2002, t_DNfm_2002,
             t_DDfm_2002, t_DLfm_2002, t_GOAfm_2002, t_GJfm_2002, t_HRfm_2002, t_HPfm_2002,t_JKfm_2002, t_JHfm_2002,
             t_KNfm_2002, t_KERfm_2002, t_LDfm_2002,t_MPfm_2002,t_MHfm_2002,t_MNfm_2002,t_MGfm_2002,t_MZfm_2002,
             t_NGfm_2002, t_ODfm_2002, t_PDfm_2002,t_PBfm_2002,t_RJfm_2002,t_SMfm_2002,t_TNfm_2002,t_TPfm_2002,
             t_UPfm_2002, t_UKfm_2002, t_WBfm_2002]
print(state_fm_2002,end=" ")
[265.0, 20610.0, 215.0, 4040.0, 1470.0, 170.0, 6605.0, 90.0, 10.0, 2050.0, 415.0, 9686.0, 3150.0, 630.0, 440.0, 595.0, 20950.0, 13225.0, 0.0, 16600.0, 25410.0, 45.0, 90.0, 50.0, 40.0, 8785.0, 785.0, 550.0, 5780.0, 120.0, 21219.0, 1430.0, 9620.0, 780.0, 29415.0] 
In [407]:
df_state_2002 = {
    
    "State":['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH',
             'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR',
             'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA',
             'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA',
             'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'],
                   
    "Total":[s2_19,s2_20,s2_21,s2_22,s2_23,s2_24,s2_25,s2_26,s2_27,s2_28,s2_29,s2_30,s2_31,s2_32,s2_33,s2_34,
           s2_35,s2_36,s2_37,s2_38,s2_39,s2_40,s2_41,s2_42,s2_43,s2_44,s2_45,s2_46,s2_47,s2_48,s2_49,s2_50,
           s2_51,s2_52,s2_53],
       
    "Male":[t_ANm_2002, t_APm_2002, t_ARPm_2002, t_ASm_2002, t_BHm_2002, t_CHm_2002, t_CTm_2002, t_DNm_2002,
             t_DDm_2002, t_DLm_2002, t_GOAm_2002, t_GJm_2002, t_HRm_2002, t_HPm_2002,t_JKm_2002, t_JHm_2002,
             t_KNm_2002, t_KERm_2002, t_LDm_2002,t_MPm_2002,t_MHm_2002,t_MNm_2002,t_MGm_2002,t_MZm_2002,
             t_NGm_2002, t_ODm_2002, t_PDm_2002,t_PBm_2002,t_RJm_2002,t_SMm_2002,t_TNm_2002,t_TPm_2002,
             t_UPm_2002, t_UKm_2002, t_WBm_2002],
                 
    "Female":[t_ANfm_2002, t_APfm_2002, t_ARPfm_2002, t_ASfm_2002, t_BHfm_2002, t_CHfm_2002, t_CTfm_2002, t_DNfm_2002,
             t_DDfm_2002, t_DLfm_2002, t_GOAfm_2002, t_GJfm_2002, t_HRfm_2002, t_HPfm_2002,t_JKfm_2002, t_JHfm_2002,
             t_KNfm_2002, t_KERfm_2002, t_LDfm_2002,t_MPfm_2002,t_MHfm_2002,t_MNfm_2002,t_MGfm_2002,t_MZfm_2002,
             t_NGfm_2002, t_ODfm_2002, t_PDfm_2002,t_PBfm_2002,t_RJfm_2002,t_SMfm_2002,t_TNfm_2002,t_TPfm_2002,
             t_UPfm_2002, t_UKfm_2002, t_WBfm_2002]
                  

}

df_All_st_2002 = pd.DataFrame(df_state_2002)
df_All_st_2002
Out[407]:
State Total Male Female
0 A & N ISLANDS 720 455.0 265.0
1 ANDHRA PRADESH 58465 37855.0 20610.0
2 ARUNACHAL PRADESH 570 355.0 215.0
3 ASSAM 12550 8510.0 4040.0
4 BIHAR 3600 2130.0 1470.0
5 CHANDIGARH 435 265.0 170.0
6 CHHATTISGARH 19750 13145.0 6605.0
7 D & N HAVELI 250 160.0 90.0
8 DAMAN & DIU 85 75.0 10.0
9 DELHI (UT) 5265 3215.0 2050.0
10 GOA 1545 1130.0 415.0
11 GUJARAT 23216 13530.0 9686.0
12 HARYANA 11000 7850.0 3150.0
13 HIMACHAL PRADESH 1670 1040.0 630.0
14 JAMMU & KASHMIR 919 479.0 440.0
15 JHARKHAND 1360 765.0 595.0
16 KARNATAKA 61350 40400.0 20950.0
17 KERALA 49050 35825.0 13225.0
18 LAKSHADWEEP 0 0.0 0.0
19 MADHYA PRADESH 34495 17895.0 16600.0
20 MAHARASHTRA 72645 47235.0 25410.0
21 MANIPUR 195 150.0 45.0
22 MEGHALAYA 332 242.0 90.0
23 MIZORAM 195 280.0 50.0
24 NAGALAND 135 95.0 40.0
25 ODISHA 21940 13155.0 8785.0
26 PUDUCHERRY 2835 2050.0 785.0
27 PUNJAB 2535 1985.0 550.0
28 RAJASTHAN 16240 10460.0 5780.0
29 SIKKIM 383 263.0 120.0
30 TAMIL NADU 56134 34915.0 21219.0
31 TRIPURA 3891 2461.0 1430.0
32 UTTAR PRADESH 21250 11630.0 9620.0
33 UTTARAKHAND 1805 1025.0 780.0
34 WEST BENGAL 65035 35620.0 29415.0
In [408]:
pivot_2002 = pd.pivot_table(df_All_st_2002, values=None, index='State', columns=None,
                       fill_value=None, margins=False, dropna=True, margins_name='All', observed=False)

pivot_2002
Out[408]:
Female Male Total
State
A & N ISLANDS 265.0 455.0 720
ANDHRA PRADESH 20610.0 37855.0 58465
ARUNACHAL PRADESH 215.0 355.0 570
ASSAM 4040.0 8510.0 12550
BIHAR 1470.0 2130.0 3600
CHANDIGARH 170.0 265.0 435
CHHATTISGARH 6605.0 13145.0 19750
D & N HAVELI 90.0 160.0 250
DAMAN & DIU 10.0 75.0 85
DELHI (UT) 2050.0 3215.0 5265
GOA 415.0 1130.0 1545
GUJARAT 9686.0 13530.0 23216
HARYANA 3150.0 7850.0 11000
HIMACHAL PRADESH 630.0 1040.0 1670
JAMMU & KASHMIR 440.0 479.0 919
JHARKHAND 595.0 765.0 1360
KARNATAKA 20950.0 40400.0 61350
KERALA 13225.0 35825.0 49050
LAKSHADWEEP 0.0 0.0 0
MADHYA PRADESH 16600.0 17895.0 34495
MAHARASHTRA 25410.0 47235.0 72645
MANIPUR 45.0 150.0 195
MEGHALAYA 90.0 242.0 332
MIZORAM 50.0 280.0 195
NAGALAND 40.0 95.0 135
ODISHA 8785.0 13155.0 21940
PUDUCHERRY 785.0 2050.0 2835
PUNJAB 550.0 1985.0 2535
RAJASTHAN 5780.0 10460.0 16240
SIKKIM 120.0 263.0 383
TAMIL NADU 21219.0 34915.0 56134
TRIPURA 1430.0 2461.0 3891
UTTAR PRADESH 9620.0 11630.0 21250
UTTARAKHAND 780.0 1025.0 1805
WEST BENGAL 29415.0 35620.0 65035
In [409]:
pivot_2002.plot(kind='bar',figsize=(60,30))

plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("States",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths of Males And Females In Different State",fontsize=55)
plt.legend(["Female","Male","Total"], prop={"size":30})

plt.show
Out[409]:
<function matplotlib.pyplot.show(close=None, block=None)>
In [410]:
cause_l_percent_2002=[]
for i in cause_l_2002:
    p=i/np.sum(cause_l_2002)
    avg_2002_cause=p*100
    cause_l_percent_2002.append(avg_2002_cause)

print(cause_l_percent_2002,end=" ")
[0.4809956882495743, 3.879488387260408, 3.5517591217073083, 1.4765027718395596, 0.0853291785934273, 1.9303235624479147, 5.6858944164643646, 0.12427986521250771, 0.1413094677343382, 0.1050762708793797, 0.03351570709083662, 0.23895793325845138, 0.170296025218305, 0.09547447371281569, 0.682089930794594, 0.12989601072502627, 0.17446284285662525, 0.16196238994166454, 3.5700568861190622, 0.1269973549766296, 0.19855791876517265, 0.06304576252762781, 0.2462045726294431, 0.4366100221022501, 0.3096126671256205, 0.40762346461828325, 0.1583390702561687, 4.544548715533171, 3.255733903402297, 0.32175078807203156, 4.117902822566035, 1.3100112322910251, 0.015761440631906952, 0.048371317801369614, 0.12464219718105729, 1.166708938729664, 0.5617957172361318, 13.649951085184245, 3.2501177578897784, 4.616471611290264, 4.3934562846479945, 5.15272292474365, 0.1387731439544911, 3.1334468640168125, 10.06123410268488, 0.11739555781006558, 0.0779013732381608, 0.07572738142686329, 0.4434943295046922, 5.078444871190985, 0.44874814304866123, 0.17591217073082357, 0.22700097829631508, 0.4226602413130911, 0.156346244429146, 1.1094604876988297, 0.5636073770788796, 0.40037682524729157, 1.556396970904743, 0.9701438457915141, 0.2460234066451683, 1.8442697199173883, 0.40744229863400844, 1.1505851661292077] 
In [411]:
np.max(cause_l_percent_2002) #Married
Out[411]:
13.649951085184245
In [412]:
np.min(cause_l_percent_2002)  #Ideological Causes/Hero Worshipping
Out[412]:
0.015761440631906952
In [413]:
state_s_2002_percent=[]
tot=np.sum(state_s_2002)
for i in state_s_2002:
    xy=i/tot
    avg_state_2002=xy*100
    state_s_2002_percent.append(avg_state_2002)

print(state_s_2002_percent,end=" ")
[0.1304714186048619, 10.594460401018402, 0.10328987306218232, 2.2741893104041897, 0.6523570930243093, 0.07882648207377072, 3.578903496452808, 0.04530257590446593, 0.015402875807518415, 0.9540722485480524, 0.27996991908959945, 4.206978408792324, 1.9933133397965006, 0.3026212070418324, 0.16653226902481674, 0.24644601292029464, 11.117252126955938, 8.888365392456215, 0.0, 6.250849423298209, 13.164022506319709, 0.035336009205483424, 0.06016182080113076, 0.035336009205483424, 0.024463390988411604, 3.9757540613759303, 0.5137312107566436, 0.45936811967128455, 2.9428553307541065, 0.0694035462856418, 10.172059183285162, 0.7050892913771076, 3.8507189518796037, 0.327084598030244, 11.785012095787767] 
In [414]:
np.max(state_s_2002_percent) #Maharashtra
Out[414]:
13.164022506319709
In [415]:
np.min(state_s_2002_percent)  #Lakshdweep
Out[415]:
0.0
In [416]:
l_age_grp_2002=[s2_4,s2_5,s2_6,s2_7,s2_8,s2_54]
l_age_grp_2002
Out[416]:
[8632, 117864, 112529, 65482, 26639, 220834]
In [417]:
l_age_grp_2002_percent=[]
for i in l_age_grp_2002:
    yz=i/s2_1
    avg_2002_age_grp=yz*100
    l_age_grp_2002_percent.append(avg_2002_age_grp)
l_age_grp_2002_percent
Out[417]:
[1.5638247762600095,
 21.35294757056415,
 20.386427044458134,
 11.863110982281967,
 4.8260806550962,
 40.00760897133954]
In [418]:
np.max(l_age_grp_2002_percent)  #0-100+
Out[418]:
40.00760897133954
In [419]:
np.min(l_age_grp_2002_percent)  #0-14
Out[419]:
1.5638247762600095
In [420]:
total_male_percent_2002= (s2_2/s2_1)*100
total_male_percent_2002
Out[420]:
62.80028261893547
In [421]:
total_female_percent_2002= (s2_3/s2_1)*100
total_female_percent_2002
Out[421]:
37.19971738106453

2003

In [422]:
df_2003 = suicide_df.loc[(suicide_df["Year"]==2003)]

df_2003
Out[422]:
State Year Type Gender Age_group Total
41 A & N ISLANDS 2003 Divorce Female 15-29 0
42 A & N ISLANDS 2003 Divorce Female 60+ 0
43 A & N ISLANDS 2003 Failure in Examination Female 60+ 0
44 A & N ISLANDS 2003 Fall in Social Reputation Male 0-14 1
45 A & N ISLANDS 2003 Family Problems Male 15-29 5
... ... ... ... ... ... ...
236418 WEST BENGAL 2003 Others Female 30-44 16
236419 WEST BENGAL 2003 Others Female 60+ 41
236420 WEST BENGAL 2003 Professional Activity Male 60+ 15
236421 WEST BENGAL 2003 Self-employed (Business activity) Male 0-14 0
236422 WEST BENGAL 2003 Service (Government) Male 0-14 0

19708 rows × 6 columns

In [423]:
t2003_dcount = df_2003.loc[:,"Total"]

s3_1 = np.sum(t2003_dcount)

s3_1
Out[423]:
554218
In [424]:
male_2003 = df_2003.loc[(df_2003["Gender"]=="Male")]

male_2003
Out[424]:
State Year Type Gender Age_group Total
44 A & N ISLANDS 2003 Fall in Social Reputation Male 0-14 1
45 A & N ISLANDS 2003 Family Problems Male 15-29 5
47 A & N ISLANDS 2003 Illness (Aids/STD) Male 30-44 0
49 A & N ISLANDS 2003 Paralysis Male 30-44 0
54 A & N ISLANDS 2003 By Consuming Insecticides Male 30-44 0
... ... ... ... ... ... ...
236414 WEST BENGAL 2003 By Jumping from (Building) Male 45-59 44
236417 WEST BENGAL 2003 House Wife Male 15-29 0
236420 WEST BENGAL 2003 Professional Activity Male 60+ 15
236421 WEST BENGAL 2003 Self-employed (Business activity) Male 0-14 0
236422 WEST BENGAL 2003 Service (Government) Male 0-14 0

9861 rows × 6 columns

In [425]:
m2003_count = male_2003.loc[:,"Total"]
s3_2 = np.sum(m2003_count)

s3_2
Out[425]:
351081
In [426]:
female_2003 = df_2003.loc[(df_2003["Gender"]=="Female")]

female_2003
Out[426]:
State Year Type Gender Age_group Total
41 A & N ISLANDS 2003 Divorce Female 15-29 0
42 A & N ISLANDS 2003 Divorce Female 60+ 0
43 A & N ISLANDS 2003 Failure in Examination Female 60+ 0
46 A & N ISLANDS 2003 Illegitimate Pregnancy Female 15-29 0
48 A & N ISLANDS 2003 Paralysis Female 45-59 0
... ... ... ... ... ... ...
236409 WEST BENGAL 2003 Professional/Career Problem Female 60+ 0
236415 WEST BENGAL 2003 Others Female 60+ 71
236416 WEST BENGAL 2003 By Over Alcoholism Female 15-29 2
236418 WEST BENGAL 2003 Others Female 30-44 16
236419 WEST BENGAL 2003 Others Female 60+ 41

9847 rows × 6 columns

In [427]:
fm2003_count = female_2003.loc[:,"Total"]
s3_3 = np.sum(fm2003_count)
s3_3
Out[427]:
203137
In [428]:
df_age_d014_2003 = df_2003.loc[(df_2003["Age_group"]=="0-14")]

df_age_d014_2003
Out[428]:
State Year Type Gender Age_group Total
44 A & N ISLANDS 2003 Fall in Social Reputation Male 0-14 1
50 A & N ISLANDS 2003 Property Dispute Female 0-14 0
59 A & N ISLANDS 2003 Farming/Agriculture Activity Female 0-14 0
124 A & N ISLANDS 2003 Service (Government) Female 0-14 0
194 A & N ISLANDS 2003 Causes Not known Male 0-14 0
... ... ... ... ... ... ...
235960 UTTAR PRADESH 2003 By Fire/Self Immolation Male 0-14 12
236172 UTTARAKHAND 2003 Failure in Examination Female 0-14 0
236399 WEST BENGAL 2003 Cancer Female 0-14 0
236421 WEST BENGAL 2003 Self-employed (Business activity) Male 0-14 0
236422 WEST BENGAL 2003 Service (Government) Male 0-14 0

3756 rows × 6 columns

In [429]:
t_014_2003 = df_age_d014_2003.loc[:,"Total"]

s3_4 = np.sum(t_014_2003)
s3_4
Out[429]:
7728
In [430]:
df_age_d1529_2003 = df_2003.loc[(df_2003["Age_group"]=="15-29")]

df_age_d1529_2003
Out[430]:
State Year Type Gender Age_group Total
41 A & N ISLANDS 2003 Divorce Female 15-29 0
45 A & N ISLANDS 2003 Family Problems Male 15-29 5
46 A & N ISLANDS 2003 Illegitimate Pregnancy Female 15-29 0
51 A & N ISLANDS 2003 Property Dispute Female 15-29 0
52 A & N ISLANDS 2003 Suspected/Illicit Relation Female 15-29 1
... ... ... ... ... ... ...
236181 UTTARAKHAND 2003 By Fire-Arms Female 15-29 1
236182 UTTARAKHAND 2003 By Over Alcoholism Female 15-29 0
236404 WEST BENGAL 2003 Not having Children(Barrenness/Impotency Male 15-29 0
236416 WEST BENGAL 2003 By Over Alcoholism Female 15-29 2
236417 WEST BENGAL 2003 House Wife Male 15-29 0

3766 rows × 6 columns

In [431]:
t_1529_2003 = df_age_d1529_2003.loc[:,"Total"]

s3_5 = np.sum(t_1529_2003)

s3_5
Out[431]:
119483
In [432]:
df_age_d3044_2003 = df_2003.loc[(df_2003["Age_group"]=="30-44")]

df_age_d3044_2003
Out[432]:
State Year Type Gender Age_group Total
47 A & N ISLANDS 2003 Illness (Aids/STD) Male 30-44 0
49 A & N ISLANDS 2003 Paralysis Male 30-44 0
54 A & N ISLANDS 2003 By Consuming Insecticides Male 30-44 0
58 A & N ISLANDS 2003 By Self Infliction of injury Male 30-44 0
61 A & N ISLANDS 2003 Service (Government) Female 30-44 0
... ... ... ... ... ... ...
236402 WEST BENGAL 2003 Death of Dear Person Male 30-44 37
236407 WEST BENGAL 2003 Physical Abuse (Rape/Incest Etc.) Female 30-44 4
236408 WEST BENGAL 2003 Poverty Female 30-44 0
236411 WEST BENGAL 2003 By Fire-Arms Male 30-44 12
236418 WEST BENGAL 2003 Others Female 30-44 16

3761 rows × 6 columns

In [433]:
t_3044_2003 = df_age_d3044_2003.loc[:,"Total"]

s3_6 = np.sum(t_3044_2003)
s3_6
Out[433]:
111042
In [434]:
df_age_d4559_2003 = df_2003.loc[(df_2003["Age_group"]=="45-59")]

df_age_d4559_2003
Out[434]:
State Year Type Gender Age_group Total
48 A & N ISLANDS 2003 Paralysis Female 45-59 0
53 A & N ISLANDS 2003 By Consuming Insecticides Female 45-59 0
57 A & N ISLANDS 2003 By Self Infliction of injury Female 45-59 0
60 A & N ISLANDS 2003 Others Male 45-59 0
111 A & N ISLANDS 2003 Ideological Causes/Hero Worshipping Female 45-59 0
... ... ... ... ... ... ...
236175 UTTARAKHAND 2003 Illegitimate Pregnancy Male 45-59 0
236403 WEST BENGAL 2003 Death of Dear Person Male 45-59 32
236412 WEST BENGAL 2003 By Fire-Arms Male 45-59 4
236413 WEST BENGAL 2003 By Hanging Male 45-59 507
236414 WEST BENGAL 2003 By Jumping from (Building) Male 45-59 44

3761 rows × 6 columns

In [435]:
t_4559_2003 = df_age_d4559_2003.loc[:,"Total"]

s3_7 = np.sum(t_4559_2003)

s3_7
Out[435]:
66991
In [436]:
df_age_d60_2003 = df_2003.loc[(df_2003["Age_group"]=="60+")]

df_age_d60_2003
Out[436]:
State Year Type Gender Age_group Total
42 A & N ISLANDS 2003 Divorce Female 60+ 0
43 A & N ISLANDS 2003 Failure in Examination Female 60+ 0
56 A & N ISLANDS 2003 By Machine Female 60+ 0
117 A & N ISLANDS 2003 Poverty Female 60+ 0
195 A & N ISLANDS 2003 Love Affairs Female 60+ 0
... ... ... ... ... ... ...
236409 WEST BENGAL 2003 Professional/Career Problem Female 60+ 0
236410 WEST BENGAL 2003 Unemployment Male 60+ 0
236415 WEST BENGAL 2003 Others Female 60+ 71
236419 WEST BENGAL 2003 Others Female 60+ 41
236420 WEST BENGAL 2003 Professional Activity Male 60+ 15

3754 rows × 6 columns

In [437]:
t_60_2003 = df_age_d60_2003.loc[:,"Total"]

s3_8 = np.sum(t_60_2003)
s3_8
Out[437]:
27272
In [438]:
df_age_d0100_2003 = df_2003.loc[(df_2003["Age_group"]=="0-100+")]

df_age_d0100_2003
Out[438]:
State Year Type Gender Age_group Total
196 A & N ISLANDS 2003 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 4
197 A & N ISLANDS 2003 Middle Male 0-100+ 42
442 A & N ISLANDS 2003 Divorcee Female 0-100+ 0
531 A & N ISLANDS 2003 Widowed/Widower Male 0-100+ 0
596 A & N ISLANDS 2003 Diploma Male 0-100+ 0
... ... ... ... ... ... ...
234716 PUDUCHERRY 2003 Never Married Female 0-100+ 72
234914 PUNJAB 2003 Graduate Female 0-100+ 8
235959 UTTAR PRADESH 2003 Primary Male 0-100+ 359
236177 UTTARAKHAND 2003 Diploma Male 0-100+ 0
236178 UTTARAKHAND 2003 Post Graduate and Above Male 0-100+ 3

910 rows × 6 columns

In [439]:
t_0100_2003 = df_age_d0100_2003.loc[:,"Total"]

s3_54 = np.sum(t_0100_2003)
s3_54
Out[439]:
221702
In [440]:
df_014m_2003 = df_age_d014_2003.loc[(df_age_d014_2003["Gender"]=="Male")]
df_014m_2003
Out[440]:
State Year Type Gender Age_group Total
44 A & N ISLANDS 2003 Fall in Social Reputation Male 0-14 1
194 A & N ISLANDS 2003 Causes Not known Male 0-14 0
203 A & N ISLANDS 2003 Professional Activity Male 0-14 0
204 A & N ISLANDS 2003 Self-employed (Business activity) Male 0-14 0
289 A & N ISLANDS 2003 By Drowning Male 0-14 0
... ... ... ... ... ... ...
235779 TRIPURA 2003 By Overdose of sleeping pills Male 0-14 0
235780 TRIPURA 2003 By Self Infliction of injury Male 0-14 0
235960 UTTAR PRADESH 2003 By Fire/Self Immolation Male 0-14 12
236421 WEST BENGAL 2003 Self-employed (Business activity) Male 0-14 0
236422 WEST BENGAL 2003 Service (Government) Male 0-14 0

1878 rows × 6 columns

In [441]:
t_014m_2003 = df_014m_2003.loc[:,"Total"]

s3_9 = np.sum(t_014m_2003)
s3_9
Out[441]:
3834
In [442]:
df_014fm_2003 = df_age_d014_2003.loc[(df_age_d014_2003["Gender"]=="Female")]
df_014fm_2003
Out[442]:
State Year Type Gender Age_group Total
50 A & N ISLANDS 2003 Property Dispute Female 0-14 0
59 A & N ISLANDS 2003 Farming/Agriculture Activity Female 0-14 0
124 A & N ISLANDS 2003 Service (Government) Female 0-14 0
202 A & N ISLANDS 2003 Others Female 0-14 0
280 A & N ISLANDS 2003 Drug Abuse/Addiction Female 0-14 0
... ... ... ... ... ... ...
235784 TRIPURA 2003 Unemployed Female 0-14 3
235954 UTTAR PRADESH 2003 Not having Children(Barrenness/Impotency Female 0-14 1
235957 UTTAR PRADESH 2003 Property Dispute Female 0-14 0
236172 UTTARAKHAND 2003 Failure in Examination Female 0-14 0
236399 WEST BENGAL 2003 Cancer Female 0-14 0

1878 rows × 6 columns

In [443]:
t_014fm_2003 = df_014fm_2003.loc[:,"Total"]

s3_10 = np.sum(t_014fm_2003)
s3_10
Out[443]:
3894
In [444]:
df_1529m_2003 = df_age_d1529_2003.loc[(df_age_d1529_2003["Gender"]=="Male")]
df_1529m_2003
Out[444]:
State Year Type Gender Age_group Total
45 A & N ISLANDS 2003 Family Problems Male 15-29 5
114 A & N ISLANDS 2003 Others Male 15-29 5
116 A & N ISLANDS 2003 Other Prolonged Illness Male 15-29 1
121 A & N ISLANDS 2003 Farming/Agriculture Activity Male 15-29 1
293 A & N ISLANDS 2003 Service (Government) Male 15-29 0
... ... ... ... ... ... ...
235778 TRIPURA 2003 By Jumping off Moving Vehicles/Trains Male 15-29 1
235961 UTTAR PRADESH 2003 By Hanging Male 15-29 267
235962 UTTAR PRADESH 2003 By Jumping from (Building) Male 15-29 14
236404 WEST BENGAL 2003 Not having Children(Barrenness/Impotency Male 15-29 0
236417 WEST BENGAL 2003 House Wife Male 15-29 0

1883 rows × 6 columns

In [445]:
t_1529m_2003 = df_1529m_2003.loc[:,"Total"]

s3_11 = np.sum(t_1529m_2003)
s3_11
Out[445]:
65090
In [446]:
df_1529fm_2003 = df_age_d1529_2003.loc[(df_age_d1529_2003["Gender"]=="Female")]
df_1529fm_2003
Out[446]:
State Year Type Gender Age_group Total
41 A & N ISLANDS 2003 Divorce Female 15-29 0
46 A & N ISLANDS 2003 Illegitimate Pregnancy Female 15-29 0
51 A & N ISLANDS 2003 Property Dispute Female 15-29 0
52 A & N ISLANDS 2003 Suspected/Illicit Relation Female 15-29 1
55 A & N ISLANDS 2003 By Machine Female 15-29 0
... ... ... ... ... ... ...
236174 UTTARAKHAND 2003 Family Problems Female 15-29 26
236180 UTTARAKHAND 2003 By Fire/Self Immolation Female 15-29 5
236181 UTTARAKHAND 2003 By Fire-Arms Female 15-29 1
236182 UTTARAKHAND 2003 By Over Alcoholism Female 15-29 0
236416 WEST BENGAL 2003 By Over Alcoholism Female 15-29 2

1883 rows × 6 columns

In [447]:
t_1529fm_2003 = df_1529fm_2003.loc[:,"Total"]

s3_12 = np.sum(t_1529fm_2003)
s3_12
Out[447]:
54393
In [448]:
df_3044m_2003 = df_age_d3044_2003.loc[(df_age_d3044_2003["Gender"]=="Male")]
df_3044m_2003
Out[448]:
State Year Type Gender Age_group Total
47 A & N ISLANDS 2003 Illness (Aids/STD) Male 30-44 0
49 A & N ISLANDS 2003 Paralysis Male 30-44 0
54 A & N ISLANDS 2003 By Consuming Insecticides Male 30-44 0
58 A & N ISLANDS 2003 By Self Infliction of injury Male 30-44 0
62 A & N ISLANDS 2003 Service (Government) Male 30-44 7
... ... ... ... ... ... ...
235776 TRIPURA 2003 By Fire/Self Immolation Male 30-44 1
235969 UTTAR PRADESH 2003 Service (Private) Male 30-44 93
236179 UTTARAKHAND 2003 By coming under running vehicles/trains Male 30-44 1
236402 WEST BENGAL 2003 Death of Dear Person Male 30-44 37
236411 WEST BENGAL 2003 By Fire-Arms Male 30-44 12

1883 rows × 6 columns

In [449]:
t_3044m_2003 = df_3044m_2003.loc[:,"Total"]

s3_13 = np.sum(t_3044m_2003)
s3_13
Out[449]:
74036
In [450]:
df_3044fm_2003 = df_age_d3044_2003.loc[(df_age_d3044_2003["Gender"]=="Female")]
df_3044fm_2003
Out[450]:
State Year Type Gender Age_group Total
61 A & N ISLANDS 2003 Service (Government) Female 30-44 0
358 A & N ISLANDS 2003 By coming under running vehicles/trains Female 30-44 0
430 A & N ISLANDS 2003 Illness (Aids/STD) Female 30-44 0
522 A & N ISLANDS 2003 Not having Children(Barrenness/Impotency Female 30-44 0
686 A & N ISLANDS 2003 Causes Not known Female 30-44 1
... ... ... ... ... ... ...
236171 UTTARAKHAND 2003 Causes Not known Female 30-44 8
236400 WEST BENGAL 2003 Causes Not known Female 30-44 239
236407 WEST BENGAL 2003 Physical Abuse (Rape/Incest Etc.) Female 30-44 4
236408 WEST BENGAL 2003 Poverty Female 30-44 0
236418 WEST BENGAL 2003 Others Female 30-44 16

1878 rows × 6 columns

In [451]:
t_3044fm_2003 = df_3044fm_2003.loc[:,"Total"]

s3_14 = np.sum(t_3044fm_2003)
s3_14
Out[451]:
37006
In [452]:
df_4559m_2003 = df_age_d4559_2003.loc[(df_age_d4559_2003["Gender"]=="Male")]
df_4559m_2003
Out[452]:
State Year Type Gender Age_group Total
60 A & N ISLANDS 2003 Others Male 45-59 0
113 A & N ISLANDS 2003 Not having Children(Barrenness/Impotency Male 45-59 0
119 A & N ISLANDS 2003 By Machine Male 45-59 0
120 A & N ISLANDS 2003 Others Male 45-59 1
122 A & N ISLANDS 2003 House Wife Male 45-59 0
... ... ... ... ... ... ...
236175 UTTARAKHAND 2003 Illegitimate Pregnancy Male 45-59 0
236403 WEST BENGAL 2003 Death of Dear Person Male 45-59 32
236412 WEST BENGAL 2003 By Fire-Arms Male 45-59 4
236413 WEST BENGAL 2003 By Hanging Male 45-59 507
236414 WEST BENGAL 2003 By Jumping from (Building) Male 45-59 44

1883 rows × 6 columns

In [453]:
t_4559m_2003 = df_4559m_2003.loc[:,"Total"]

s3_15 = np.sum(t_4559m_2003)
s3_15
Out[453]:
48332
In [454]:
df_4559fm_2003 = df_age_d4559_2003.loc[(df_age_d4559_2003["Gender"]=="Female")]
df_4559fm_2003
Out[454]:
State Year Type Gender Age_group Total
48 A & N ISLANDS 2003 Paralysis Female 45-59 0
53 A & N ISLANDS 2003 By Consuming Insecticides Female 45-59 0
57 A & N ISLANDS 2003 By Self Infliction of injury Female 45-59 0
111 A & N ISLANDS 2003 Ideological Causes/Hero Worshipping Female 45-59 0
115 A & N ISLANDS 2003 Other Prolonged Illness Female 45-59 2
... ... ... ... ... ... ...
235765 TRIPURA 2003 Divorce Female 45-59 0
235766 TRIPURA 2003 Drug Abuse/Addiction Female 45-59 0
235955 UTTAR PRADESH 2003 Paralysis Female 45-59 0
235967 UTTAR PRADESH 2003 Professional Activity Female 45-59 1
235968 UTTAR PRADESH 2003 Service (Government) Female 45-59 1

1878 rows × 6 columns

In [455]:
t_4559fm_2003 = df_4559fm_2003.loc[:,"Total"]

s3_16 = np.sum(t_4559fm_2003)
s3_16
Out[455]:
18659
In [456]:
df_60m_2003 = df_age_d60_2003.loc[(df_age_d60_2003["Gender"]=="Male")]
df_60m_2003
Out[456]:
State Year Type Gender Age_group Total
278 A & N ISLANDS 2003 Causes Not known Male 60+ 2
284 A & N ISLANDS 2003 Suspected/Illicit Relation Male 60+ 0
351 A & N ISLANDS 2003 Illegitimate Pregnancy Male 60+ 0
359 A & N ISLANDS 2003 By Fire/Self Immolation Male 60+ 0
361 A & N ISLANDS 2003 Public Sector Undertaking Male 60+ 0
... ... ... ... ... ... ...
235966 UTTAR PRADESH 2003 Others Male 60+ 33
236176 UTTARAKHAND 2003 Insanity/Mental Illness Male 60+ 0
236406 WEST BENGAL 2003 Other Prolonged Illness Male 60+ 84
236410 WEST BENGAL 2003 Unemployment Male 60+ 0
236420 WEST BENGAL 2003 Professional Activity Male 60+ 15

1879 rows × 6 columns

In [457]:
t_60m_2003 = df_60m_2003.loc[:,"Total"]

s3_17 = np.sum(t_60m_2003)
s3_17
Out[457]:
19347
In [458]:
df_60fm_2003 = df_age_d60_2003.loc[(df_age_d60_2003["Gender"]=="Female")]
df_60fm_2003
Out[458]:
State Year Type Gender Age_group Total
42 A & N ISLANDS 2003 Divorce Female 60+ 0
43 A & N ISLANDS 2003 Failure in Examination Female 60+ 0
56 A & N ISLANDS 2003 By Machine Female 60+ 0
117 A & N ISLANDS 2003 Poverty Female 60+ 0
195 A & N ISLANDS 2003 Love Affairs Female 60+ 0
... ... ... ... ... ... ...
236401 WEST BENGAL 2003 Death of Dear Person Female 60+ 0
236405 WEST BENGAL 2003 Others Female 60+ 26
236409 WEST BENGAL 2003 Professional/Career Problem Female 60+ 0
236415 WEST BENGAL 2003 Others Female 60+ 71
236419 WEST BENGAL 2003 Others Female 60+ 41

1875 rows × 6 columns

In [459]:
t_60fm_2003 = df_60fm_2003.loc[:,"Total"]

s3_18 = np.sum(t_60fm_2003)
s3_18
Out[459]:
7925
In [460]:
df_0100fm_2003 = df_age_d0100_2003.loc[(df_age_d0100_2003["Gender"]=="Female")]
df_0100fm_2003
Out[460]:
State Year Type Gender Age_group Total
442 A & N ISLANDS 2003 Divorcee Female 0-100+ 0
937 A & N ISLANDS 2003 Diploma Female 0-100+ 0
946 A & N ISLANDS 2003 Widowed/Widower Female 0-100+ 0
1081 A & N ISLANDS 2003 No Education Female 0-100+ 1
1412 A & N ISLANDS 2003 Hr. Secondary/Intermediate/Pre-Universit Female 0-100+ 1
... ... ... ... ... ... ...
233259 MADHYA PRADESH 2003 Seperated Female 0-100+ 35
234070 MIZORAM 2003 Matriculate/Secondary Female 0-100+ 2
234500 ODISHA 2003 Widowed/Widower Female 0-100+ 108
234716 PUDUCHERRY 2003 Never Married Female 0-100+ 72
234914 PUNJAB 2003 Graduate Female 0-100+ 8

455 rows × 6 columns

In [461]:
t_0100fm_2003 = df_0100fm_2003.loc[:,"Total"]

s3_55 = np.sum(t_0100fm_2003)
s3_55
Out[461]:
81260
In [462]:
df_0100m_2003 = df_age_d0100_2003.loc[(df_age_d0100_2003["Gender"]=="Male")]
df_0100m_2003
Out[462]:
State Year Type Gender Age_group Total
196 A & N ISLANDS 2003 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 4
197 A & N ISLANDS 2003 Middle Male 0-100+ 42
531 A & N ISLANDS 2003 Widowed/Widower Male 0-100+ 0
596 A & N ISLANDS 2003 Diploma Male 0-100+ 0
698 A & N ISLANDS 2003 Primary Male 0-100+ 5
... ... ... ... ... ... ...
233469 MAHARASHTRA 2003 Never Married Male 0-100+ 1925
233688 MANIPUR 2003 Primary Male 0-100+ 0
235959 UTTAR PRADESH 2003 Primary Male 0-100+ 359
236177 UTTARAKHAND 2003 Diploma Male 0-100+ 0
236178 UTTARAKHAND 2003 Post Graduate and Above Male 0-100+ 3

455 rows × 6 columns

In [463]:
t_0100m_2003 = df_0100m_2003.loc[:,"Total"]

s3_56 = np.sum(t_0100m_2003)
s3_56
Out[463]:
140442
In [464]:
df_st_AN_2003 = df_2003.loc[(df_2003["State"]=="A & N ISLANDS")]

df_st_AN_2003
Out[464]:
State Year Type Gender Age_group Total
41 A & N ISLANDS 2003 Divorce Female 15-29 0
42 A & N ISLANDS 2003 Divorce Female 60+ 0
43 A & N ISLANDS 2003 Failure in Examination Female 60+ 0
44 A & N ISLANDS 2003 Fall in Social Reputation Male 0-14 1
45 A & N ISLANDS 2003 Family Problems Male 15-29 5
... ... ... ... ... ... ...
5150 A & N ISLANDS 2003 By Over Alcoholism Female 45-59 0
5151 A & N ISLANDS 2003 House Wife Female 15-29 17
5152 A & N ISLANDS 2003 Professional Activity Female 15-29 0
5153 A & N ISLANDS 2003 Professional Activity Female 60+ 0
5154 A & N ISLANDS 2003 Self-employed (Business activity) Female 15-29 0

556 rows × 6 columns

In [465]:
t_AN_2003 = df_st_AN_2003.loc[:,"Total"]

s3_19 = np.sum(t_AN_2003)
s3_19
Out[465]:
565
In [466]:
df_st_AP_2003 = df_2003.loc[(df_2003["State"]=="ANDHRA PRADESH")]

df_st_AP_2003
Out[466]:
State Year Type Gender Age_group Total
5078 ANDHRA PRADESH 2003 Bankruptcy or Sudden change in Economic Male 45-59 55
5079 ANDHRA PRADESH 2003 Cancer Female 15-29 18
5080 ANDHRA PRADESH 2003 Drug Abuse/Addiction Male 15-29 3
5081 ANDHRA PRADESH 2003 Family Problems Male 60+ 78
5082 ANDHRA PRADESH 2003 Insanity/Mental Illness Male 15-29 159
... ... ... ... ... ... ...
229365 ANDHRA PRADESH 2003 By Fire/Self Immolation Male 0-14 10
229366 ANDHRA PRADESH 2003 By Fire-Arms Male 0-14 0
229367 ANDHRA PRADESH 2003 Self-employed (Business activity) Male 15-29 87
229368 ANDHRA PRADESH 2003 Service (Private) Female 45-59 21
229369 ANDHRA PRADESH 2003 Widowed/Widower Male 0-100+ 324

566 rows × 6 columns

In [467]:
t_AP_2003 = df_st_AP_2003.loc[:,"Total"]

s3_20 = np.sum(t_AP_2003)
s3_20
Out[467]:
57045
In [468]:
df_st_ARP_2003 = df_2003.loc[(df_2003["State"]=="ARUNACHAL PRADESH")]

df_st_ARP_2003
Out[468]:
State Year Type Gender Age_group Total
9913 ARUNACHAL PRADESH 2003 Cancer Male 15-29 0
9914 ARUNACHAL PRADESH 2003 Drug Abuse/Addiction Male 30-44 0
9915 ARUNACHAL PRADESH 2003 Failure in Examination Male 30-44 0
9916 ARUNACHAL PRADESH 2003 Illness (Aids/STD) Female 15-29 0
11827 ARUNACHAL PRADESH 2003 Cancellation/Non-Settlement of Marriage Female 30-44 0
... ... ... ... ... ... ...
229587 ARUNACHAL PRADESH 2003 By Consuming Other Poison Male 60+ 1
229588 ARUNACHAL PRADESH 2003 By Jumping from (Other sites) Male 15-29 0
229589 ARUNACHAL PRADESH 2003 By Jumping from (Other sites) Male 60+ 0
229590 ARUNACHAL PRADESH 2003 Service (Private) Female 30-44 0
229591 ARUNACHAL PRADESH 2003 Never Married Female 0-100+ 7

556 rows × 6 columns

In [469]:
t_ARP_2003 = df_st_ARP_2003.loc[:,"Total"]

s3_21 = np.sum(t_ARP_2003)
s3_21
Out[469]:
405
In [470]:
df_st_AS_2003 = df_2003.loc[(df_2003["State"]=="ASSAM")]

df_st_AS_2003
Out[470]:
State Year Type Gender Age_group Total
16983 ASSAM 2003 Divorce Female 30-44 8
16984 ASSAM 2003 Divorce Male 15-29 2
16985 ASSAM 2003 Dowry Dispute Male 60+ 0
16986 ASSAM 2003 Ideological Causes/Hero Worshipping Female 30-44 0
16987 ASSAM 2003 Ideological Causes/Hero Worshipping Male 60+ 0
... ... ... ... ... ... ...
229787 ASSAM 2003 Professional/Career Problem Male 15-29 0
229788 ASSAM 2003 By Consuming Other Poison Female 30-44 45
229789 ASSAM 2003 By Consuming Other Poison Male 60+ 3
229790 ASSAM 2003 Farming/Agriculture Activity Female 0-14 0
229791 ASSAM 2003 Unemployed Female 30-44 28

565 rows × 6 columns

In [471]:
t_AS_2003 = df_st_AS_2003.loc[:,"Total"]

s3_22 = np.sum(t_AS_2003)
s3_22
Out[471]:
12963
In [472]:
df_st_BH_2003 = df_2003.loc[(df_2003["State"]=="BIHAR")]

df_st_BH_2003
Out[472]:
State Year Type Gender Age_group Total
21995 BIHAR 2003 Death of Dear Person Female 45-59 0
21996 BIHAR 2003 Divorce Female 45-59 0
21997 BIHAR 2003 Failure in Examination Female 0-14 1
21998 BIHAR 2003 Fall in Social Reputation Male 45-59 0
21999 BIHAR 2003 Insanity/Mental Illness Female 30-44 0
... ... ... ... ... ... ...
229991 BIHAR 2003 By Over Alcoholism Female 30-44 0
229992 BIHAR 2003 Farming/Agriculture Activity Male 45-59 12
229993 BIHAR 2003 Others Male 0-14 7
229994 BIHAR 2003 Others Male 60+ 0
229995 BIHAR 2003 Married Female 0-100+ 155

564 rows × 6 columns

In [473]:
t_BH_2003 = df_st_BH_2003.loc[:,"Total"]

s3_23 = np.sum(t_BH_2003)
s3_23
Out[473]:
2984
In [474]:
df_st_CH_2003 = df_2003.loc[(df_2003["State"]=="CHANDIGARH")]

df_st_CH_2003
Out[474]:
State Year Type Gender Age_group Total
27361 CHANDIGARH 2003 Bankruptcy or Sudden change in Economic Female 45-59 0
27362 CHANDIGARH 2003 Dowry Dispute Male 30-44 0
27363 CHANDIGARH 2003 Failure in Examination Male 45-59 0
27364 CHANDIGARH 2003 Family Problems Female 45-59 0
27365 CHANDIGARH 2003 Ideological Causes/Hero Worshipping Male 30-44 0
... ... ... ... ... ... ...
230215 CHANDIGARH 2003 Others Female 0-14 0
230216 CHANDIGARH 2003 Others Male 45-59 3
230217 CHANDIGARH 2003 By Over Alcoholism Male 60+ 0
230218 CHANDIGARH 2003 By touching electric wires Male 30-44 0
230219 CHANDIGARH 2003 Professional Activity Male 15-29 1

561 rows × 6 columns

In [475]:
t_CH_2003 = df_st_CH_2003.loc[:,"Total"]

s3_24 = np.sum(t_CH_2003)
s3_24
Out[475]:
515
In [476]:
df_st_CT_2003 = df_2003.loc[(df_2003["State"]=="CHHATTISGARH")]

df_st_CT_2003
Out[476]:
State Year Type Gender Age_group Total
35651 CHHATTISGARH 2003 Death of Dear Person Male 15-29 17
35652 CHHATTISGARH 2003 Not having Children(Barrenness/Impotency Male 60+ 1
35653 CHHATTISGARH 2003 Paralysis Female 45-59 0
35654 CHHATTISGARH 2003 Physical Abuse (Rape/Incest Etc.) Male 45-59 0
35655 CHHATTISGARH 2003 Professional/Career Problem Female 30-44 0
... ... ... ... ... ... ...
230456 CHHATTISGARH 2003 By Jumping from (Building) Male 30-44 16
230457 CHHATTISGARH 2003 By Machine Female 45-59 0
230458 CHHATTISGARH 2003 By Over Alcoholism Male 0-14 0
230459 CHHATTISGARH 2003 By Over Alcoholism Male 15-29 15
230460 CHHATTISGARH 2003 Professional Activity Male 0-14 1

566 rows × 6 columns

In [477]:
t_CT_2003 = df_st_CT_2003.loc[:,"Total"]

s3_25 = np.sum(t_CT_2003)
s3_25
Out[477]:
19595
In [478]:
df_st_DN_2003 = df_2003.loc[(df_2003["State"]=="D & N HAVELI")]

df_st_DN_2003
Out[478]:
State Year Type Gender Age_group Total
41499 D & N HAVELI 2003 Bankruptcy or Sudden change in Economic Female 15-29 0
41500 D & N HAVELI 2003 Cancellation/Non-Settlement of Marriage Male 45-59 0
41501 D & N HAVELI 2003 Drug Abuse/Addiction Female 60+ 0
41502 D & N HAVELI 2003 Failure in Examination Male 60+ 0
41503 D & N HAVELI 2003 Fall in Social Reputation Male 30-44 0
... ... ... ... ... ... ...
230657 D & N HAVELI 2003 By Machine Male 30-44 0
230658 D & N HAVELI 2003 Others Female 15-29 0
230659 D & N HAVELI 2003 Professional Activity Female 30-44 0
230660 D & N HAVELI 2003 Self-employed (Business activity) Female 30-44 0
230661 D & N HAVELI 2003 Student Male 30-44 0

557 rows × 6 columns

In [479]:
t_DN_2003 = df_st_DN_2003.loc[:,"Total"]

s3_26 = np.sum(t_DN_2003)
s3_26
Out[479]:
260
In [480]:
df_st_DD_2003 = df_2003.loc[(df_2003["State"]=="DAMAN & DIU")]

df_st_DD_2003
Out[480]:
State Year Type Gender Age_group Total
48093 DAMAN & DIU 2003 Causes Not known Male 45-59 2
48094 DAMAN & DIU 2003 Death of Dear Person Male 30-44 0
48095 DAMAN & DIU 2003 Divorce Male 15-29 0
48096 DAMAN & DIU 2003 Insanity/Mental Illness Female 30-44 1
48097 DAMAN & DIU 2003 Love Affairs Female 15-29 0
... ... ... ... ... ... ...
230870 DAMAN & DIU 2003 By Self Infliction of injury Female 45-59 0
230871 DAMAN & DIU 2003 House Wife Female 45-59 1
230872 DAMAN & DIU 2003 Others Female 0-14 0
230873 DAMAN & DIU 2003 Retired Person Female 15-29 0
230874 DAMAN & DIU 2003 Service (Government) Female 30-44 0

559 rows × 6 columns

In [481]:
t_DD_2003 = df_st_DD_2003.loc[:,"Total"]

s3_27 = np.sum(t_DD_2003)
s3_27
Out[481]:
118
In [482]:
df_st_DL_2003 = df_2003.loc[(df_2003["State"]=="DELHI (UT)")]

df_st_DL_2003
Out[482]:
State Year Type Gender Age_group Total
53327 DELHI (UT) 2003 Cancellation/Non-Settlement of Marriage Female 15-29 2
53328 DELHI (UT) 2003 Divorce Female 45-59 0
53329 DELHI (UT) 2003 Family Problems Male 15-29 89
53330 DELHI (UT) 2003 Ideological Causes/Hero Worshipping Female 30-44 0
53331 DELHI (UT) 2003 Suspected/Illicit Relation Female 60+ 0
... ... ... ... ... ... ...
231073 DELHI (UT) 2003 Farming/Agriculture Activity Male 15-29 4
231074 DELHI (UT) 2003 House Wife Male 15-29 0
231075 DELHI (UT) 2003 Others Male 30-44 56
231076 DELHI (UT) 2003 Self-employed (Business activity) Male 0-14 0
231077 DELHI (UT) 2003 Service (Government) Male 0-14 0

566 rows × 6 columns

In [483]:
t_DL_2003 = df_st_DL_2003.loc[:,"Total"]

s3_28 = np.sum(t_DL_2003)
s3_28
Out[483]:
5765
In [484]:
df_st_GOA_2003 = df_2003.loc[(df_2003["State"]=="GOA")]

df_st_GOA_2003
Out[484]:
State Year Type Gender Age_group Total
58303 GOA 2003 Causes Not known Female 60+ 0
58304 GOA 2003 Divorce Female 30-44 0
58305 GOA 2003 Drug Abuse/Addiction Male 60+ 0
59827 GOA 2003 Cancer Male 45-59 0
59828 GOA 2003 Dowry Dispute Female 45-59 0
... ... ... ... ... ... ...
231323 GOA 2003 By Self Infliction of injury Male 15-29 0
231324 GOA 2003 By Self Infliction of injury Male 60+ 0
231325 GOA 2003 By touching electric wires Female 30-44 0
231326 GOA 2003 By touching electric wires Female 60+ 0
231327 GOA 2003 Retired Person Female 45-59 0

563 rows × 6 columns

In [485]:
t_GOA_2003 = df_st_GOA_2003.loc[:,"Total"]

s3_29 = np.sum(t_GOA_2003)
s3_29
Out[485]:
1500
In [486]:
df_st_GJ_2003 = df_2003.loc[(df_2003["State"]=="GUJARAT")]

df_st_GJ_2003
Out[486]:
State Year Type Gender Age_group Total
64973 GUJARAT 2003 Bankruptcy or Sudden change in Economic Male 15-29 36
64974 GUJARAT 2003 Divorce Female 60+ 1
64975 GUJARAT 2003 Failure in Examination Female 30-44 0
64976 GUJARAT 2003 Family Problems Male 60+ 9
64977 GUJARAT 2003 Ideological Causes/Hero Worshipping Male 60+ 0
... ... ... ... ... ... ...
231540 GUJARAT 2003 By touching electric wires Female 45-59 0
231541 GUJARAT 2003 House Wife Male 0-14 0
231542 GUJARAT 2003 Others Female 30-44 16
231543 GUJARAT 2003 Public Sector Undertaking Male 30-44 18
231544 GUJARAT 2003 Self-employed (Business activity) Female 0-14 0

566 rows × 6 columns

In [487]:
t_GJ_2003 = df_st_GJ_2003.loc[:,"Total"]

s3_30 = np.sum(t_GJ_2003)
s3_30
Out[487]:
22830
In [488]:
df_st_HR_2003 = df_2003.loc[(df_2003["State"]=="HARYANA")]

df_st_HR_2003
Out[488]:
State Year Type Gender Age_group Total
72305 HARYANA 2003 Drug Abuse/Addiction Male 15-29 11
72306 HARYANA 2003 Failure in Examination Male 0-14 4
72307 HARYANA 2003 Fall in Social Reputation Female 45-59 1
72308 HARYANA 2003 Ideological Causes/Hero Worshipping Male 45-59 3
72309 HARYANA 2003 Insanity/Mental Illness Female 45-59 10
... ... ... ... ... ... ...
231739 HARYANA 2003 Professional Activity Female 0-14 0
231740 HARYANA 2003 Public Sector Undertaking Female 0-14 0
231741 HARYANA 2003 Public Sector Undertaking Male 30-44 33
231742 HARYANA 2003 Service (Private) Female 60+ 0
231743 HARYANA 2003 Service (Private) Male 15-29 68

566 rows × 6 columns

In [489]:
t_HR_2003 = df_st_HR_2003.loc[:,"Total"]

s3_31 = np.sum(t_HR_2003)
s3_31
Out[489]:
11135
In [490]:
df_st_HP_2003 = df_2003.loc[(df_2003["State"]=="HIMACHAL PRADESH")]

df_st_HP_2003
Out[490]:
State Year Type Gender Age_group Total
77202 HIMACHAL PRADESH 2003 Causes Not known Female 15-29 10
77203 HIMACHAL PRADESH 2003 Death of Dear Person Female 30-44 0
77204 HIMACHAL PRADESH 2003 Illegitimate Pregnancy Female 30-44 0
77205 HIMACHAL PRADESH 2003 Insanity/Mental Illness Male 30-44 5
77206 HIMACHAL PRADESH 2003 Not having Children(Barrenness/Impotency Male 15-29 0
... ... ... ... ... ... ...
231979 HIMACHAL PRADESH 2003 Retired Person Female 0-14 0
231980 HIMACHAL PRADESH 2003 Student Female 60+ 0
231981 HIMACHAL PRADESH 2003 Unemployed Female 60+ 0
231982 HIMACHAL PRADESH 2003 Unemployed Male 30-44 15
231983 HIMACHAL PRADESH 2003 Seperated Female 0-100+ 2

564 rows × 6 columns

In [491]:
t_HP_2003 = df_st_HP_2003.loc[:,"Total"]

s3_32 = np.sum(t_HP_2003)
s3_32
Out[491]:
1926
In [492]:
df_st_JK_2003 = df_2003.loc[(df_2003["State"]=="JAMMU & KASHMIR")]

df_st_JK_2003
Out[492]:
State Year Type Gender Age_group Total
84591 JAMMU & KASHMIR 2003 Cancer Female 45-59 0
84592 JAMMU & KASHMIR 2003 Death of Dear Person Female 15-29 0
84593 JAMMU & KASHMIR 2003 Divorce Male 0-14 0
84594 JAMMU & KASHMIR 2003 Dowry Dispute Female 15-29 12
84595 JAMMU & KASHMIR 2003 Illness (Aids/STD) Female 30-44 1
... ... ... ... ... ... ...
232193 JAMMU & KASHMIR 2003 By Machine Male 30-44 0
232194 JAMMU & KASHMIR 2003 House Wife Female 0-14 1
232195 JAMMU & KASHMIR 2003 Professional Activity Female 30-44 0
232196 JAMMU & KASHMIR 2003 Self-employed (Business activity) Female 30-44 0
232197 JAMMU & KASHMIR 2003 Student Male 30-44 0

566 rows × 6 columns

In [493]:
t_JK_2003 = df_st_JK_2003.loc[:,"Total"]

s3_33 = np.sum(t_JK_2003)
s3_33
Out[493]:
690
In [494]:
df_st_JH_2003 = df_2003.loc[(df_2003["State"]=="JHARKHAND")]

df_st_JH_2003
Out[494]:
State Year Type Gender Age_group Total
91733 JHARKHAND 2003 Death of Dear Person Female 15-29 0
91734 JHARKHAND 2003 Death of Dear Person Male 0-14 0
91735 JHARKHAND 2003 Failure in Examination Male 30-44 0
91736 JHARKHAND 2003 Family Problems Female 30-44 20
91737 JHARKHAND 2003 Illegitimate Pregnancy Male 60+ 0
... ... ... ... ... ... ...
232429 JHARKHAND 2003 By touching electric wires Female 15-29 0
232430 JHARKHAND 2003 By touching electric wires Female 60+ 0
232431 JHARKHAND 2003 Self-employed (Business activity) Male 60+ 0
232432 JHARKHAND 2003 Service (Private) Male 30-44 4
232433 JHARKHAND 2003 Student Female 45-59 0

565 rows × 6 columns

In [495]:
t_JH_2003 = df_st_JH_2003.loc[:,"Total"]

s3_34 = np.sum(t_JH_2003)
s3_34
Out[495]:
1360
In [496]:
df_st_KN_2003 = df_2003.loc[(df_2003["State"]=="KARNATAKA")]

df_st_KN_2003
Out[496]:
State Year Type Gender Age_group Total
96651 KARNATAKA 2003 Cancer Male 60+ 8
96652 KARNATAKA 2003 Failure in Examination Male 0-14 11
96653 KARNATAKA 2003 Ideological Causes/Hero Worshipping Male 45-59 4
96654 KARNATAKA 2003 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
96655 KARNATAKA 2003 Professional/Career Problem Female 60+ 0
... ... ... ... ... ... ...
232621 KARNATAKA 2003 By Overdose of sleeping pills Male 15-29 18
232622 KARNATAKA 2003 House Wife Male 30-44 0
232623 KARNATAKA 2003 House Wife Male 60+ 0
232624 KARNATAKA 2003 Service (Private) Male 15-29 194
232625 KARNATAKA 2003 Service (Private) Male 30-44 266

566 rows × 6 columns

In [497]:
t_KN_2003 = df_st_KN_2003.loc[:,"Total"]

s3_35 = np.sum(t_KN_2003)
s3_35
Out[497]:
61805
In [498]:
df_st_KER_2003 = df_2003.loc[(df_2003["State"]=="KERALA")]

df_st_KER_2003
Out[498]:
State Year Type Gender Age_group Total
101519 KERALA 2003 Dowry Dispute Male 30-44 0
101520 KERALA 2003 Ideological Causes/Hero Worshipping Male 0-14 0
101521 KERALA 2003 Ideological Causes/Hero Worshipping Male 15-29 0
101522 KERALA 2003 Illness (Aids/STD) Male 30-44 1
101523 KERALA 2003 Insanity/Mental Illness Female 45-59 118
... ... ... ... ... ... ...
232799 KERALA 2003 Others Male 30-44 38
232800 KERALA 2003 Farming/Agriculture Activity Male 30-44 407
232801 KERALA 2003 Others Female 30-44 78
232802 KERALA 2003 Professional Activity Female 45-59 1
232803 KERALA 2003 Service (Government) Male 45-59 47

566 rows × 6 columns

In [499]:
t_KER_2003 = df_st_KER_2003.loc[:,"Total"]

s3_36 = np.sum(t_KER_2003)
s3_36
Out[499]:
47190
In [500]:
df_st_LD_2003 = df_2003.loc[(df_2003["State"]=="LAKSHADWEEP")]

df_st_LD_2003
Out[500]:
State Year Type Gender Age_group Total
108018 LAKSHADWEEP 2003 Bankruptcy or Sudden change in Economic Male 30-44 0
108019 LAKSHADWEEP 2003 Fall in Social Reputation Male 45-59 0
108020 LAKSHADWEEP 2003 Illegitimate Pregnancy Female 60+ 0
108021 LAKSHADWEEP 2003 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
108022 LAKSHADWEEP 2003 Poverty Male 15-29 0
... ... ... ... ... ... ...
233024 LAKSHADWEEP 2003 Others Male 45-59 0
233025 LAKSHADWEEP 2003 By Over Alcoholism Male 60+ 0
233026 LAKSHADWEEP 2003 By touching electric wires Male 30-44 0
233027 LAKSHADWEEP 2003 Student Female 0-14 0
233028 LAKSHADWEEP 2003 Unemployed Female 15-29 0

557 rows × 6 columns

In [501]:
t_LD_2003 = df_st_LD_2003.loc[:,"Total"]

s3_37 = np.sum(t_LD_2003)
s3_37
Out[501]:
10
In [502]:
df_st_MP_2003 = df_2003.loc[(df_2003["State"]=="MADHYA PRADESH")]

df_st_MP_2003
Out[502]:
State Year Type Gender Age_group Total
114160 MADHYA PRADESH 2003 Causes Not known Male 15-29 380
114161 MADHYA PRADESH 2003 Dowry Dispute Male 60+ 0
114162 MADHYA PRADESH 2003 Failure in Examination Female 30-44 0
114163 MADHYA PRADESH 2003 Illegitimate Pregnancy Female 60+ 0
114164 MADHYA PRADESH 2003 Poverty Female 0-14 0
... ... ... ... ... ... ...
233255 MADHYA PRADESH 2003 Others Female 45-59 27
233256 MADHYA PRADESH 2003 Public Sector Undertaking Female 0-14 1
233257 MADHYA PRADESH 2003 Service (Government) Male 30-44 88
233258 MADHYA PRADESH 2003 Unemployed Female 45-59 0
233259 MADHYA PRADESH 2003 Seperated Female 0-100+ 35

566 rows × 6 columns

In [503]:
t_MP_2003 = df_st_MP_2003.loc[:,"Total"]

s3_38 = np.sum(t_MP_2003)
s3_38
Out[503]:
33810
In [504]:
df_st_MH_2003 = df_2003.loc[(df_2003["State"]=="MAHARASHTRA")]

df_st_MH_2003
Out[504]:
State Year Type Gender Age_group Total
118751 MAHARASHTRA 2003 Bankruptcy or Sudden change in Economic Female 0-14 0
118752 MAHARASHTRA 2003 Cancellation/Non-Settlement of Marriage Female 0-14 0
118753 MAHARASHTRA 2003 Death of Dear Person Female 15-29 23
118754 MAHARASHTRA 2003 Drug Abuse/Addiction Male 45-59 227
118755 MAHARASHTRA 2003 Paralysis Male 0-14 0
... ... ... ... ... ... ...
233465 MAHARASHTRA 2003 By Consuming Insecticides Male 15-29 1069
233466 MAHARASHTRA 2003 By Drowning Female 60+ 72
233467 MAHARASHTRA 2003 By Jumping from (Building) Female 15-29 12
233468 MAHARASHTRA 2003 Public Sector Undertaking Male 15-29 24
233469 MAHARASHTRA 2003 Never Married Male 0-100+ 1925

566 rows × 6 columns

In [505]:
t_MH_2003 = df_st_MH_2003.loc[:,"Total"]

s3_39 = np.sum(t_MH_2003)
s3_39
Out[505]:
73800
In [506]:
df_st_MN_2003 = df_2003.loc[(df_2003["State"]=="MANIPUR")]

df_st_MN_2003
Out[506]:
State Year Type Gender Age_group Total
125196 MANIPUR 2003 Cancer Male 0-14 0
125197 MANIPUR 2003 Divorce Male 0-14 0
125198 MANIPUR 2003 Failure in Examination Female 45-59 0
125199 MANIPUR 2003 Illness (Aids/STD) Male 60+ 0
125200 MANIPUR 2003 Others Female 45-59 0
... ... ... ... ... ... ...
233693 MANIPUR 2003 Farming/Agriculture Activity Female 45-59 0
233694 MANIPUR 2003 House Wife Female 60+ 1
233695 MANIPUR 2003 Others Male 30-44 0
233696 MANIPUR 2003 Retired Person Male 30-44 0
233697 MANIPUR 2003 Service (Private) Male 15-29 0

556 rows × 6 columns

In [507]:
t_MN_2003 = df_st_MN_2003.loc[:,"Total"]

s3_40 = np.sum(t_MN_2003)
s3_40
Out[507]:
130
In [508]:
df_st_MG_2003 = df_2003.loc[(df_2003["State"]=="MEGHALAYA")]

df_st_MG_2003
Out[508]:
State Year Type Gender Age_group Total
130196 MEGHALAYA 2003 Causes Not known Male 30-44 8
130197 MEGHALAYA 2003 Divorce Female 0-14 0
130198 MEGHALAYA 2003 Drug Abuse/Addiction Male 0-14 0
130199 MEGHALAYA 2003 Illness (Aids/STD) Male 45-59 0
130200 MEGHALAYA 2003 Insanity/Mental Illness Male 60+ 0
... ... ... ... ... ... ...
233895 MEGHALAYA 2003 By Overdose of sleeping pills Female 30-44 0
233896 MEGHALAYA 2003 By Self Infliction of injury Female 30-44 0
233897 MEGHALAYA 2003 Farming/Agriculture Activity Female 45-59 0
233898 MEGHALAYA 2003 House Wife Female 60+ 1
233899 MEGHALAYA 2003 Retired Person Male 30-44 0

562 rows × 6 columns

In [509]:
t_MG_2003 = df_st_MG_2003.loc[:,"Total"]

s3_41 = np.sum(t_MG_2003)
s3_41
Out[509]:
205
In [510]:
df_st_MZ_2003 = df_2003.loc[(df_2003["State"]=="MIZORAM")]

df_st_MZ_2003
Out[510]:
State Year Type Gender Age_group Total
135467 MIZORAM 2003 Cancer Female 15-29 0
135468 MIZORAM 2003 Causes Not known Female 15-29 2
135469 MIZORAM 2003 Drug Abuse/Addiction Female 45-59 0
135470 MIZORAM 2003 Failure in Examination Male 45-59 0
135471 MIZORAM 2003 Fall in Social Reputation Female 0-14 0
... ... ... ... ... ... ...
234079 MIZORAM 2003 By touching electric wires Female 45-59 0
234080 MIZORAM 2003 House Wife Male 0-14 0
234081 MIZORAM 2003 Others Male 15-29 2
234082 MIZORAM 2003 Professional Activity Female 15-29 0
234083 MIZORAM 2003 Public Sector Undertaking Female 15-29 0

563 rows × 6 columns

In [511]:
t_MN_2003 = df_st_MN_2003.loc[:,"Total"]

s3_42 = np.sum(t_MN_2003)
s3_42
Out[511]:
130
In [512]:
df_st_NG_2003 = df_2003.loc[(df_2003["State"]=="NAGALAND")]

df_st_NG_2003
Out[512]:
State Year Type Gender Age_group Total
142270 NAGALAND 2003 Cancellation/Non-Settlement of Marriage Male 30-44 0
142271 NAGALAND 2003 Illness (Aids/STD) Female 30-44 0
142272 NAGALAND 2003 Others Female 15-29 1
142273 NAGALAND 2003 Paralysis Female 30-44 0
142274 NAGALAND 2003 Suspected/Illicit Relation Male 60+ 0
... ... ... ... ... ... ...
234300 NAGALAND 2003 By coming under running vehicles/trains Female 0-14 0
234301 NAGALAND 2003 By Fire-Arms Female 45-59 0
234302 NAGALAND 2003 Others Female 30-44 0
234303 NAGALAND 2003 Others Female 60+ 0
234304 NAGALAND 2003 By touching electric wires Male 0-14 0

557 rows × 6 columns

In [513]:
t_NG_2003 = df_st_NG_2003.loc[:,"Total"]

s3_43 = np.sum(t_NG_2003)
s3_43
Out[513]:
109
In [514]:
df_st_OD_2003 = df_2003.loc[(df_2003["State"]=="ODISHA")]

df_st_OD_2003
Out[514]:
State Year Type Gender Age_group Total
147064 ODISHA 2003 Drug Abuse/Addiction Male 45-59 0
147065 ODISHA 2003 Love Affairs Female 30-44 64
147066 ODISHA 2003 Not having Children(Barrenness/Impotency Male 45-59 3
147067 ODISHA 2003 Poverty Male 15-29 7
147068 ODISHA 2003 Unemployment Female 0-14 0
... ... ... ... ... ... ...
234496 ODISHA 2003 By Fire-Arms Female 60+ 0
234497 ODISHA 2003 By Machine Male 0-14 0
234498 ODISHA 2003 Professional Activity Female 0-14 0
234499 ODISHA 2003 Professional Activity Female 15-29 6
234500 ODISHA 2003 Widowed/Widower Female 0-100+ 108

566 rows × 6 columns

In [515]:
t_OD_2003 = df_st_OD_2003.loc[:,"Total"]

s3_44 = np.sum(t_OD_2003)
s3_44
Out[515]:
22100
In [516]:
df_st_PD_2003 = df_2003.loc[(df_2003["State"]=="PUDUCHERRY")]

df_st_PD_2003
Out[516]:
State Year Type Gender Age_group Total
153385 PUDUCHERRY 2003 Bankruptcy or Sudden change in Economic Male 60+ 2
153386 PUDUCHERRY 2003 Causes Not known Male 45-59 7
153387 PUDUCHERRY 2003 Illegitimate Pregnancy Male 45-59 0
153388 PUDUCHERRY 2003 Love Affairs Male 0-14 0
153389 PUDUCHERRY 2003 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
... ... ... ... ... ... ...
234712 PUDUCHERRY 2003 Others Female 45-59 0
234713 PUDUCHERRY 2003 Professional Activity Male 60+ 1
234714 PUDUCHERRY 2003 Self-employed (Business activity) Male 15-29 4
234715 PUDUCHERRY 2003 Self-employed (Business activity) Male 60+ 4
234716 PUDUCHERRY 2003 Never Married Female 0-100+ 72

563 rows × 6 columns

In [517]:
t_PD_2003 = df_st_PD_2003.loc[:,"Total"]

s3_45 = np.sum(t_PD_2003)
s3_45
Out[517]:
2910
In [518]:
df_st_PB_2003 = df_2003.loc[(df_2003["State"]=="PUNJAB")]

df_st_PB_2003
Out[518]:
State Year Type Gender Age_group Total
157841 PUNJAB 2003 Bankruptcy or Sudden change in Economic Male 0-14 0
157842 PUNJAB 2003 Bankruptcy or Sudden change in Economic Male 30-44 1
157843 PUNJAB 2003 Family Problems Female 15-29 14
157844 PUNJAB 2003 Poverty Male 15-29 8
157845 PUNJAB 2003 Property Dispute Female 45-59 0
... ... ... ... ... ... ...
234915 PUNJAB 2003 By Hanging Male 30-44 37
234916 PUNJAB 2003 By Over Alcoholism Female 0-14 0
234917 PUNJAB 2003 Service (Private) Female 60+ 1
234918 PUNJAB 2003 Service (Private) Male 30-44 13
234919 PUNJAB 2003 Unemployed Female 45-59 0

566 rows × 6 columns

In [519]:
t_PB_2003 = df_st_PB_2003.loc[:,"Total"]

s3_46 = np.sum(t_PB_2003)
s3_46
Out[519]:
3155
In [520]:
df_st_RJ_2003 = df_2003.loc[(df_2003["State"]=="RAJASTHAN")]

df_st_RJ_2003
Out[520]:
State Year Type Gender Age_group Total
164599 RAJASTHAN 2003 Bankruptcy or Sudden change in Economic Female 15-29 13
164600 RAJASTHAN 2003 Bankruptcy or Sudden change in Economic Male 30-44 34
164601 RAJASTHAN 2003 Death of Dear Person Male 15-29 4
164602 RAJASTHAN 2003 Drug Abuse/Addiction Male 30-44 56
164603 RAJASTHAN 2003 Family Problems Male 15-29 126
... ... ... ... ... ... ...
235119 RAJASTHAN 2003 Farming/Agriculture Activity Female 30-44 27
235120 RAJASTHAN 2003 Others Female 60+ 7
235121 RAJASTHAN 2003 Public Sector Undertaking Male 0-14 0
235122 RAJASTHAN 2003 Self-employed (Business activity) Male 30-44 72
235123 RAJASTHAN 2003 Student Male 30-44 4

566 rows × 6 columns

In [521]:
t_RJ_2003 = df_st_RJ_2003.loc[:,"Total"]

s3_47 = np.sum(t_RJ_2003)
s3_47
Out[521]:
18305
In [522]:
df_st_SM_2003 = df_2003.loc[(df_2003["State"]=="SIKKIM")]

df_st_SM_2003
Out[522]:
State Year Type Gender Age_group Total
169247 SIKKIM 2003 Death of Dear Person Male 45-59 1
169248 SIKKIM 2003 Dowry Dispute Male 15-29 0
169249 SIKKIM 2003 Fall in Social Reputation Male 45-59 0
169250 SIKKIM 2003 Ideological Causes/Hero Worshipping Male 15-29 0
169251 SIKKIM 2003 Insanity/Mental Illness Male 30-44 4
... ... ... ... ... ... ...
235332 SIKKIM 2003 By Hanging Male 45-59 6
235333 SIKKIM 2003 By Jumping from (Building) Female 0-14 0
235334 SIKKIM 2003 By Jumping off Moving Vehicles/Trains Male 15-29 0
235335 SIKKIM 2003 Others Female 30-44 0
235336 SIKKIM 2003 Public Sector Undertaking Male 45-59 0

558 rows × 6 columns

In [523]:
t_SM_2003 = df_st_SM_2003.loc[:,"Total"]

s3_48 = np.sum(t_SM_2003)
s3_48
Out[523]:
525
In [524]:
df_st_TN_2003 = df_2003.loc[(df_2003["State"]=="TAMIL NADU")]

df_st_TN_2003
Out[524]:
State Year Type Gender Age_group Total
175023 TAMIL NADU 2003 Causes Not known Female 30-44 203
175024 TAMIL NADU 2003 Causes Not known Male 30-44 419
175025 TAMIL NADU 2003 Family Problems Male 0-14 26
175026 TAMIL NADU 2003 Other Prolonged Illness Male 45-59 381
175027 TAMIL NADU 2003 Suspected/Illicit Relation Female 15-29 39
... ... ... ... ... ... ...
235558 TAMIL NADU 2003 By Hanging Male 15-29 409
235559 TAMIL NADU 2003 Others Female 30-44 168
235560 TAMIL NADU 2003 Others Male 60+ 108
235561 TAMIL NADU 2003 House Wife Male 15-29 0
235562 TAMIL NADU 2003 Professional Activity Male 45-59 95

566 rows × 6 columns

In [525]:
t_TN_2003 = df_st_TN_2003.loc[:,"Total"]

s3_49 = np.sum(t_TN_2003)
s3_49
Out[525]:
59360
In [526]:
df_st_TP_2003 = df_2003.loc[(df_2003["State"]=="TRIPURA")]

df_st_TP_2003
Out[526]:
State Year Type Gender Age_group Total
181233 TRIPURA 2003 Death of Dear Person Female 60+ 0
181234 TRIPURA 2003 Illness (Aids/STD) Female 45-59 0
181235 TRIPURA 2003 Not having Children(Barrenness/Impotency Female 60+ 0
181236 TRIPURA 2003 Others Female 30-44 1
181237 TRIPURA 2003 By Fire-Arms Female 60+ 0
... ... ... ... ... ... ...
235780 TRIPURA 2003 By Self Infliction of injury Male 0-14 0
235781 TRIPURA 2003 By touching electric wires Female 15-29 0
235782 TRIPURA 2003 Professional Activity Male 60+ 0
235783 TRIPURA 2003 Self-employed (Business activity) Male 60+ 0
235784 TRIPURA 2003 Unemployed Female 0-14 3

563 rows × 6 columns

In [527]:
t_TP_2003 = df_st_TP_2003.loc[:,"Total"]

s3_50 = np.sum(t_TP_2003)
s3_50
Out[527]:
4220
In [528]:
df_st_UP_2003 = df_2003.loc[(df_2003["State"]=="UTTAR PRADESH")]

df_st_UP_2003
Out[528]:
State Year Type Gender Age_group Total
185569 UTTAR PRADESH 2003 Cancellation/Non-Settlement of Marriage Male 60+ 0
185570 UTTAR PRADESH 2003 Cancer Female 30-44 0
185571 UTTAR PRADESH 2003 Fall in Social Reputation Female 45-59 7
185572 UTTAR PRADESH 2003 Insanity/Mental Illness Male 45-59 29
185573 UTTAR PRADESH 2003 Professional/Career Problem Male 45-59 5
... ... ... ... ... ... ...
235965 UTTAR PRADESH 2003 By Overdose of sleeping pills Female 30-44 2
235966 UTTAR PRADESH 2003 Others Male 60+ 33
235967 UTTAR PRADESH 2003 Professional Activity Female 45-59 1
235968 UTTAR PRADESH 2003 Service (Government) Female 45-59 1
235969 UTTAR PRADESH 2003 Service (Private) Male 30-44 93

566 rows × 6 columns

In [529]:
t_UP_2003 = df_st_UP_2003.loc[:,"Total"]

s3_51 = np.sum(t_UP_2003)
s3_51
Out[529]:
18315
In [530]:
df_st_UK_2003 = df_2003.loc[(df_2003["State"]=="UTTARAKHAND")]

df_st_UK_2003
Out[530]:
State Year Type Gender Age_group Total
189959 UTTARAKHAND 2003 Bankruptcy or Sudden change in Economic Male 15-29 3
189960 UTTARAKHAND 2003 Causes Not known Male 15-29 49
189961 UTTARAKHAND 2003 Failure in Examination Female 30-44 2
189962 UTTARAKHAND 2003 Illness (Aids/STD) Male 45-59 0
189963 UTTARAKHAND 2003 Insanity/Mental Illness Female 15-29 0
... ... ... ... ... ... ...
236178 UTTARAKHAND 2003 Post Graduate and Above Male 0-100+ 3
236179 UTTARAKHAND 2003 By coming under running vehicles/trains Male 30-44 1
236180 UTTARAKHAND 2003 By Fire/Self Immolation Female 15-29 5
236181 UTTARAKHAND 2003 By Fire-Arms Female 15-29 1
236182 UTTARAKHAND 2003 By Over Alcoholism Female 15-29 0

563 rows × 6 columns

In [531]:
t_UK_2003 = df_st_UK_2003.loc[:,"Total"]

s3_52 = np.sum(t_UK_2003)
s3_52
Out[531]:
1953
In [532]:
df_st_WB_2003 = df_2003.loc[(df_2003["State"]=="WEST BENGAL")]

df_st_WB_2003
Out[532]:
State Year Type Gender Age_group Total
196821 WEST BENGAL 2003 Cancer Female 60+ 5
196822 WEST BENGAL 2003 Drug Abuse/Addiction Female 45-59 0
196823 WEST BENGAL 2003 Ideological Causes/Hero Worshipping Male 60+ 0
196824 WEST BENGAL 2003 Paralysis Male 60+ 4
196825 WEST BENGAL 2003 Physical Abuse (Rape/Incest Etc.) Female 15-29 11
... ... ... ... ... ... ...
236418 WEST BENGAL 2003 Others Female 30-44 16
236419 WEST BENGAL 2003 Others Female 60+ 41
236420 WEST BENGAL 2003 Professional Activity Male 60+ 15
236421 WEST BENGAL 2003 Self-employed (Business activity) Male 0-14 0
236422 WEST BENGAL 2003 Service (Government) Male 0-14 0

566 rows × 6 columns

In [533]:
t_WB_2003 = df_st_WB_2003.loc[:,"Total"]

s3_53 = np.sum(t_WB_2003)
s3_53
Out[533]:
66400
In [534]:
t_ANm_2003 = np.sum(df_st_AN_2003.where(df_st_AN_2003["Gender"]=="Male")["Total"])
t_ANm_2003
Out[534]:
350.0
In [535]:
t_ANfm_2003 = np.sum(df_st_AN_2003.where(df_st_AN_2003["Gender"]=="Female")["Total"])
t_ANfm_2003
Out[535]:
215.0
In [536]:
t_APm_2003 = np.sum(df_st_AP_2003.where(df_st_AP_2003["Gender"]=="Male")["Total"])
t_APm_2003
Out[536]:
37565.0
In [537]:
t_APfm_2003 = np.sum(df_st_AP_2003.where(df_st_AP_2003["Gender"]=="Female")["Total"])
t_APfm_2003
Out[537]:
19480.0
In [538]:
t_ARPm_2003 = np.sum(df_st_ARP_2003.where(df_st_ARP_2003["Gender"]=="Male")["Total"])
t_ARPm_2003
Out[538]:
270.0
In [539]:
t_ARPfm_2003 = np.sum(df_st_ARP_2003.where(df_st_ARP_2003["Gender"]=="Female")["Total"])
t_ARPfm_2003
Out[539]:
135.0
In [540]:
t_ASm_2003 = np.sum(df_st_AS_2003.where(df_st_AS_2003["Gender"]=="Male")["Total"])
t_ASm_2003
Out[540]:
8363.0
In [541]:
t_ASfm_2003 = np.sum(df_st_AS_2003.where(df_st_AS_2003["Gender"]=="Female")["Total"])
t_ASfm_2003
Out[541]:
4600.0
In [542]:
t_BHm_2003 = np.sum(df_st_BH_2003.where(df_st_BH_2003["Gender"]=="Male")["Total"])
t_BHm_2003
Out[542]:
1755.0
In [543]:
t_BHfm_2003 = np.sum(df_st_BH_2003.where(df_st_BH_2003["Gender"]=="Female")["Total"])
t_BHfm_2003
Out[543]:
1229.0
In [544]:
t_CHm_2003 = np.sum(df_st_CH_2003.where(df_st_CH_2003["Gender"]=="Male")["Total"])
t_CHm_2003
Out[544]:
340.0
In [545]:
t_CHfm_2003 = np.sum(df_st_CH_2003.where(df_st_CH_2003["Gender"]=="Female")["Total"])
t_CHfm_2003
Out[545]:
175.0
In [546]:
t_CTm_2003 = np.sum(df_st_CT_2003.where(df_st_CT_2003["Gender"]=="Male")["Total"])
t_CTm_2003
Out[546]:
12960.0
In [547]:
t_CTfm_2003 = np.sum(df_st_CT_2003.where(df_st_CT_2003["Gender"]=="Female")["Total"])
t_CTfm_2003
Out[547]:
6635.0
In [548]:
t_DNm_2003 = np.sum(df_st_DN_2003.where(df_st_DN_2003["Gender"]=="Male")["Total"])
t_DNm_2003
Out[548]:
150.0
In [549]:
t_DNfm_2003 = np.sum(df_st_DN_2003.where(df_st_DN_2003["Gender"]=="Female")["Total"])
t_DNfm_2003
Out[549]:
110.0
In [550]:
t_DDm_2003 = np.sum(df_st_DD_2003.where(df_st_DD_2003["Gender"]=="Male")["Total"])
t_DDm_2003
Out[550]:
88.0
In [551]:
t_DDfm_2003 = np.sum(df_st_DD_2003.where(df_st_DD_2003["Gender"]=="Female")["Total"])
t_DDfm_2003
Out[551]:
30.0
In [552]:
t_DLm_2003 = np.sum(df_st_DL_2003.where(df_st_DL_2003["Gender"]=="Male")["Total"])
t_DLm_2003
Out[552]:
3705.0
In [553]:
t_DLfm_2003 = np.sum(df_st_DL_2003.where(df_st_DL_2003["Gender"]=="Female")["Total"])
t_DLfm_2003
Out[553]:
2060.0
In [554]:
t_GOAm_2003 = np.sum(df_st_GOA_2003.where(df_st_GOA_2003["Gender"]=="Male")["Total"])
t_GOAm_2003
Out[554]:
1065.0
In [555]:
t_GOAfm_2003 = np.sum(df_st_GOA_2003.where(df_st_GOA_2003["Gender"]=="Female")["Total"])
t_GOAfm_2003
Out[555]:
435.0
In [556]:
t_GJm_2003 = np.sum(df_st_GJ_2003.where(df_st_GJ_2003["Gender"]=="Male")["Total"])
t_GJm_2003
Out[556]:
13250.0
In [557]:
t_GJfm_2003 = np.sum(df_st_GJ_2003.where(df_st_GJ_2003["Gender"]=="Female")["Total"])
t_GJfm_2003
Out[557]:
9580.0
In [558]:
t_HRm_2003 = np.sum(df_st_HR_2003.where(df_st_HR_2003["Gender"]=="Male")["Total"])
t_HRm_2003
Out[558]:
8065.0
In [559]:
t_HRfm_2003 = np.sum(df_st_HR_2003.where(df_st_HR_2003["Gender"]=="Female")["Total"])
t_HRfm_2003
Out[559]:
3070.0
In [560]:
t_HPm_2003 = np.sum(df_st_HP_2003.where(df_st_HP_2003["Gender"]=="Male")["Total"])
t_HPm_2003
Out[560]:
1196.0
In [561]:
t_HPfm_2003 = np.sum(df_st_HP_2003.where(df_st_HP_2003["Gender"]=="Female")["Total"])
t_HPfm_2003
Out[561]:
730.0
In [562]:
t_JKm_2003 = np.sum(df_st_JK_2003.where(df_st_JK_2003["Gender"]=="Male")["Total"])
t_JKm_2003
Out[562]:
315.0
In [563]:
t_JKfm_2003 = np.sum(df_st_JK_2003.where(df_st_JK_2003["Gender"]=="Female")["Total"])
t_JKfm_2003
Out[563]:
375.0
In [564]:
t_JHm_2003 = np.sum(df_st_JH_2003.where(df_st_JH_2003["Gender"]=="Male")["Total"])
t_JHm_2003
Out[564]:
765.0
In [565]:
t_JHfm_2003 = np.sum(df_st_JH_2003.where(df_st_JH_2003["Gender"]=="Female")["Total"])
t_JHfm_2003
Out[565]:
595.0
In [566]:
t_KNm_2003 = np.sum(df_st_KN_2003.where(df_st_KN_2003["Gender"]=="Male")["Total"])
t_KNm_2003
Out[566]:
41875.0
In [567]:
t_KNfm_2003 = np.sum(df_st_KN_2003.where(df_st_KN_2003["Gender"]=="Female")["Total"])
t_KNfm_2003
Out[567]:
19930.0
In [568]:
t_KERm_2003 = np.sum(df_st_KER_2003.where(df_st_KER_2003["Gender"]=="Male")["Total"])
t_KERm_2003
Out[568]:
34675.0
In [569]:
t_KERfm_2003 = np.sum(df_st_KER_2003.where(df_st_KER_2003["Gender"]=="Female")["Total"])
t_KERfm_2003
Out[569]:
12515.0
In [570]:
t_LDm_2003 = np.sum(df_st_LD_2003.where(df_st_LD_2003["Gender"]=="Male")["Total"])
t_LDm_2003
Out[570]:
5.0
In [571]:
t_LDfm_2003 = np.sum(df_st_LD_2003.where(df_st_LD_2003["Gender"]=="Female")["Total"])
t_LDfm_2003
Out[571]:
5.0
In [572]:
t_MPm_2003 = np.sum(df_st_MP_2003.where(df_st_MP_2003["Gender"]=="Male")["Total"])
t_MPm_2003
Out[572]:
17690.0
In [573]:
t_MPfm_2003 = np.sum(df_st_MP_2003.where(df_st_MP_2003["Gender"]=="Female")["Total"])
t_MPfm_2003
Out[573]:
16120.0
In [574]:
t_MHm_2003 = np.sum(df_st_MH_2003.where(df_st_MH_2003["Gender"]=="Male")["Total"])
t_MHm_2003
Out[574]:
49050.0
In [575]:
t_MHfm_2003 = np.sum(df_st_MH_2003.where(df_st_MH_2003["Gender"]=="Female")["Total"])
t_MHfm_2003
Out[575]:
24750.0
In [576]:
t_MNm_2003 = np.sum(df_st_MN_2003.where(df_st_MN_2003["Gender"]=="Male")["Total"])
t_MNm_2003
Out[576]:
105.0
In [577]:
t_MNfm_2003 = np.sum(df_st_MN_2003.where(df_st_MN_2003["Gender"]=="Female")["Total"])
t_MNfm_2003
Out[577]:
25.0
In [578]:
t_MGm_2003 = np.sum(df_st_MG_2003.where(df_st_MG_2003["Gender"]=="Male")["Total"])
t_MGm_2003
Out[578]:
160.0
In [579]:
t_MGfm_2003 = np.sum(df_st_MG_2003.where(df_st_MG_2003["Gender"]=="Female")["Total"])
t_MGfm_2003
Out[579]:
45.0
In [580]:
t_MZm_2003 = np.sum(df_st_MZ_2003.where(df_st_MZ_2003["Gender"]=="Male")["Total"])
t_MZm_2003
Out[580]:
205.0
In [581]:
t_MZfm_2003 = np.sum(df_st_MZ_2003.where(df_st_MZ_2003["Gender"]=="Female")["Total"])
t_MZfm_2003
Out[581]:
55.0
In [582]:
t_NGm_2003 = np.sum(df_st_NG_2003.where(df_st_NG_2003["Gender"]=="Male")["Total"])
t_NGm_2003
Out[582]:
84.0
In [583]:
t_NGfm_2003 = np.sum(df_st_NG_2003.where(df_st_NG_2003["Gender"]=="Female")["Total"])
t_MGfm_2003
Out[583]:
45.0
In [584]:
t_ODm_2003 = np.sum(df_st_OD_2003.where(df_st_OD_2003["Gender"]=="Male")["Total"])
t_ODm_2003
Out[584]:
13700.0
In [585]:
t_ODfm_2003 = np.sum(df_st_OD_2003.where(df_st_OD_2003["Gender"]=="Female")["Total"])
t_ODfm_2003
Out[585]:
8400.0
In [586]:
t_PDm_2003 = np.sum(df_st_PD_2003.where(df_st_PD_2003["Gender"]=="Male")["Total"])
t_PDm_2003
Out[586]:
1940.0
In [587]:
t_PDfm_2003 = np.sum(df_st_PD_2003.where(df_st_PD_2003["Gender"]=="Female")["Total"])
t_PDfm_2003
Out[587]:
970.0
In [588]:
t_PBm_2003 = np.sum(df_st_PB_2003.where(df_st_PB_2003["Gender"]=="Male")["Total"])
t_PBm_2003
Out[588]:
2530.0
In [589]:
t_PBfm_2003 = np.sum(df_st_PB_2003.where(df_st_PB_2003["Gender"]=="Female")["Total"])
t_PBfm_2003
Out[589]:
625.0
In [590]:
t_RJm_2003 = np.sum(df_st_RJ_2003.where(df_st_RJ_2003["Gender"]=="Male")["Total"])
t_RJm_2003
Out[590]:
11945.0
In [591]:
t_RJfm_2003 = np.sum(df_st_RJ_2003.where(df_st_RJ_2003["Gender"]=="Female")["Total"])
t_RJfm_2003
Out[591]:
6360.0
In [592]:
t_SMm_2003 = np.sum(df_st_SM_2003.where(df_st_SM_2003["Gender"]=="Male")["Total"])
t_SMm_2003
Out[592]:
340.0
In [593]:
t_SMfm_2003 = np.sum(df_st_SM_2003.where(df_st_SM_2003["Gender"]=="Female")["Total"])
t_SMfm_2003
Out[593]:
185.0
In [594]:
t_TNm_2003 = np.sum(df_st_TN_2003.where(df_st_TN_2003["Gender"]=="Male")["Total"])
t_TNm_2003
Out[594]:
35770.0
In [595]:
t_TNfm_2003 = np.sum(df_st_TN_2003.where(df_st_TN_2003["Gender"]=="Female")["Total"])
t_TNfm_2003
Out[595]:
23590.0
In [596]:
t_TPm_2003 = np.sum(df_st_TP_2003.where(df_st_TP_2003["Gender"]=="Male")["Total"])
t_TPm_2003
Out[596]:
2440.0
In [597]:
t_TPfm_2003 = np.sum(df_st_TP_2003.where(df_st_TP_2003["Gender"]=="Female")["Total"])
t_TPfm_2003
Out[597]:
1780.0
In [598]:
t_UPm_2003 = np.sum(df_st_UP_2003.where(df_st_UP_2003["Gender"]=="Male")["Total"])
t_UPm_2003
Out[598]:
9935.0
In [599]:
t_UPfm_2003 = np.sum(df_st_UP_2003.where(df_st_UP_2003["Gender"]=="Female")["Total"])
t_UPfm_2003
Out[599]:
8380.0
In [600]:
t_UKm_2003 = np.sum(df_st_UK_2003.where(df_st_UK_2003["Gender"]=="Male")["Total"])
t_UKm_2003
Out[600]:
1310.0
In [601]:
t_UKfm_2003 = np.sum(df_st_UK_2003.where(df_st_UK_2003["Gender"]=="Female")["Total"])
t_UKfm_2003
Out[601]:
643.0
In [602]:
t_WBm_2003 = np.sum(df_st_WB_2003.where(df_st_WB_2003["Gender"]=="Male")["Total"])
t_WBm_2003
Out[602]:
37120.0
In [603]:
t_WBfm_2003 = np.sum(df_st_WB_2003.where(df_st_WB_2003["Gender"]=="Female")["Total"])
t_WBfm_2003
Out[603]:
29280.0
In [604]:
l_2003=list(df_2003.loc[:,"Type"].unique())
l_2003.sort()
print(l_2003,end=" ")
['Bankruptcy or Sudden change in Economic', 'By Consuming Insecticides', 'By Consuming Other Poison', 'By Drowning', 'By Fire-Arms', 'By Fire/Self Immolation', 'By Hanging', 'By Jumping from (Building)', 'By Jumping from (Other sites)', 'By Jumping off Moving Vehicles/Trains', 'By Machine', 'By Over Alcoholism', 'By Overdose of sleeping pills', 'By Self Infliction of injury', 'By coming under running vehicles/trains', 'By touching electric wires', 'Cancellation/Non-Settlement of Marriage', 'Cancer', 'Causes Not known', 'Death of Dear Person', 'Diploma', 'Divorce', 'Divorcee', 'Dowry Dispute', 'Drug Abuse/Addiction', 'Failure in Examination', 'Fall in Social Reputation', 'Family Problems', 'Farming/Agriculture Activity', 'Graduate', 'House Wife', 'Hr. Secondary/Intermediate/Pre-Universit', 'Ideological Causes/Hero Worshipping', 'Illegitimate Pregnancy', 'Illness (Aids/STD)', 'Insanity/Mental Illness', 'Love Affairs', 'Married', 'Matriculate/Secondary', 'Middle', 'Never Married', 'No Education', 'Not having Children(Barrenness/Impotency', 'Other Prolonged Illness', 'Others', 'Paralysis', 'Physical Abuse (Rape/Incest Etc.)', 'Post Graduate and Above', 'Poverty', 'Primary', 'Professional Activity', 'Professional/Career Problem', 'Property Dispute', 'Public Sector Undertaking', 'Retired Person', 'Self-employed (Business activity)', 'Seperated', 'Service (Government)', 'Service (Private)', 'Student', 'Suspected/Illicit Relation', 'Unemployed', 'Unemployment', 'Widowed/Widower'] 
In [605]:
cause_l_2003=[]
for i in l_2003:
    rough= np.sum(df_2003.where(df_2003["Type"]==i)["Total"])
    cause_l_2003.append(rough)

print(cause_l_2003,end=" ")
[2866.0, 23001.0, 19592.0, 7956.0, 544.0, 10395.0, 32571.0, 697.0, 570.0, 491.0, 120.0, 1106.0, 1381.0, 429.0, 2991.0, 751.0, 933.0, 652.0, 17631.0, 1010.0, 906.0, 308.0, 1127.0, 2447.0, 1763.0, 2255.0, 912.0, 26308.0, 17164.0, 2104.0, 23301.0, 8355.0, 242.0, 249.0, 769.0, 7323.0, 3996.0, 77148.0, 18542.0, 25503.0, 24137.0, 25964.0, 732.0, 15636.0, 54265.0, 514.0, 503.0, 462.0, 2671.0, 29015.0, 3065.0, 1008.0, 1515.0, 2890.0, 1062.0, 5678.0, 2952.0, 2333.0, 8109.0, 6091.0, 1291.0, 9913.0, 2516.0, 5487.0] 
In [606]:
x1_2003 = set(df_2003.loc[:,"State"])
x1_2003
len(x1_2003)
Out[606]:
35
In [607]:
cause_df_2003 = pd.DataFrame(cause_l_2003,l_2003)
cause_df_2003.reset_index()
Out[607]:
index 0
0 Bankruptcy or Sudden change in Economic 2866.0
1 By Consuming Insecticides 23001.0
2 By Consuming Other Poison 19592.0
3 By Drowning 7956.0
4 By Fire-Arms 544.0
... ... ...
59 Student 6091.0
60 Suspected/Illicit Relation 1291.0
61 Unemployed 9913.0
62 Unemployment 2516.0
63 Widowed/Widower 5487.0

64 rows × 2 columns

In [608]:
cause_df_2003.plot.bar(stacked=True,figsize=(50,20))
plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("Causes",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths due to Different Causes in 2003",fontsize=55)
plt.legend(["Death Count"], prop={"size":30})
Out[608]:
<matplotlib.legend.Legend at 0xeb60a0>
In [609]:
s_2003=list(df_2003.loc[:,"State"].unique())
s_2003.sort()
print(s_2003,end=" ")
['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH', 'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR', 'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA', 'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA', 'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'] 
In [610]:
state_s_2003 = [s3_19,s3_20,s3_21,s3_22,s3_23,s3_24,s3_25,s3_26,s3_27,s3_28,s3_29,s3_30,s3_31,s3_32,s3_33,s3_34,
           s3_35,s3_36,s3_37,s3_38,s3_39,s3_40,s3_41,s3_42,s3_43,s3_44,s3_45,s3_46,s3_47,s3_48,s3_49,s3_50,
           s3_51,s3_52,s3_53]
print(state_s_2003,end=" ")
[565, 57045, 405, 12963, 2984, 515, 19595, 260, 118, 5765, 1500, 22830, 11135, 1926, 690, 1360, 61805, 47190, 10, 33810, 73800, 130, 205, 130, 109, 22100, 2910, 3155, 18305, 525, 59360, 4220, 18315, 1953, 66400] 
In [611]:
state_m_2003=[t_ANm_2003, t_APm_2003, t_ARPm_2003, t_ASm_2003, t_BHm_2003, t_CHm_2003, t_CTm_2003, t_DNm_2003,
             t_DDm_2003, t_DLm_2003, t_GOAm_2003, t_GJm_2003, t_HRm_2003, t_HPm_2003,t_JKm_2003, t_JHm_2003,
             t_KNm_2003, t_KERm_2003, t_LDm_2003,t_MPm_2003,t_MHm_2003,t_MNm_2003,t_MGm_2003,t_MZm_2003,
             t_NGm_2003, t_ODm_2003, t_PDm_2003,t_PBm_2003,t_RJm_2003,t_SMm_2003,t_TNm_2003,t_TPm_2003,
             t_UPm_2003, t_UKm_2003, t_WBm_2003]
print(state_m_2003,end=" ")
[350.0, 37565.0, 270.0, 8363.0, 1755.0, 340.0, 12960.0, 150.0, 88.0, 3705.0, 1065.0, 13250.0, 8065.0, 1196.0, 315.0, 765.0, 41875.0, 34675.0, 5.0, 17690.0, 49050.0, 105.0, 160.0, 205.0, 84.0, 13700.0, 1940.0, 2530.0, 11945.0, 340.0, 35770.0, 2440.0, 9935.0, 1310.0, 37120.0] 
In [612]:
state_fm_2003=[t_ANfm_2003, t_APfm_2003, t_ARPfm_2003, t_ASfm_2003, t_BHfm_2003, t_CHfm_2003, t_CTfm_2003, t_DNfm_2003,
             t_DDfm_2003, t_DLfm_2003, t_GOAfm_2003, t_GJfm_2003, t_HRfm_2003, t_HPfm_2003,t_JKfm_2003, t_JHfm_2003,
             t_KNfm_2003, t_KERfm_2003, t_LDfm_2003,t_MPfm_2003,t_MHfm_2003,t_MNfm_2003,t_MGfm_2003,t_MZfm_2003,
             t_NGfm_2003, t_ODfm_2003, t_PDfm_2003,t_PBfm_2003,t_RJfm_2003,t_SMfm_2003,t_TNfm_2003,t_TPfm_2003,
             t_UPfm_2003, t_UKfm_2003, t_WBfm_2003]
print(state_fm_2003,end=" ")
[215.0, 19480.0, 135.0, 4600.0, 1229.0, 175.0, 6635.0, 110.0, 30.0, 2060.0, 435.0, 9580.0, 3070.0, 730.0, 375.0, 595.0, 19930.0, 12515.0, 5.0, 16120.0, 24750.0, 25.0, 45.0, 55.0, 25.0, 8400.0, 970.0, 625.0, 6360.0, 185.0, 23590.0, 1780.0, 8380.0, 643.0, 29280.0] 
In [613]:
df_state_2003 = {
    
    "State":['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH',
             'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR',
             'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA',
             'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA',
             'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'],
                   
    "Total":[s3_19,s3_20,s3_21,s3_22,s3_23,s3_24,s3_25,s3_26,s3_27,s3_28,s3_29,s3_30,s3_31,s3_32,s3_33,s3_34,
           s3_35,s3_36,s3_37,s3_38,s3_39,s3_40,s3_41,s3_42,s3_43,s3_44,s3_45,s3_46,s3_47,s3_48,s3_49,s3_50,
           s3_51,s3_52,s3_53],
       
    "Male":[t_ANm_2003, t_APm_2003, t_ARPm_2003, t_ASm_2003, t_BHm_2003, t_CHm_2003, t_CTm_2003, t_DNm_2003,
             t_DDm_2003, t_DLm_2003, t_GOAm_2003, t_GJm_2003, t_HRm_2003, t_HPm_2003,t_JKm_2003, t_JHm_2003,
             t_KNm_2003, t_KERm_2003, t_LDm_2003,t_MPm_2003,t_MHm_2003,t_MNm_2003,t_MGm_2003,t_MZm_2003,
             t_NGm_2003, t_ODm_2003, t_PDm_2003,t_PBm_2003,t_RJm_2003,t_SMm_2003,t_TNm_2003,t_TPm_2003,
             t_UPm_2003, t_UKm_2003, t_WBm_2003],
                 
    "Female":[t_ANfm_2003, t_APfm_2003, t_ARPfm_2003, t_ASfm_2003, t_BHfm_2003, t_CHfm_2003, t_CTfm_2003, t_DNfm_2003,
             t_DDfm_2003, t_DLfm_2003, t_GOAfm_2003, t_GJfm_2003, t_HRfm_2003, t_HPfm_2003,t_JKfm_2003, t_JHfm_2003,
             t_KNfm_2003, t_KERfm_2003, t_LDfm_2003,t_MPfm_2003,t_MHfm_2003,t_MNfm_2003,t_MGfm_2003,t_MZfm_2003,
             t_NGfm_2003, t_ODfm_2003, t_PDfm_2003,t_PBfm_2003,t_RJfm_2003,t_SMfm_2003,t_TNfm_2003,t_TPfm_2003,
             t_UPfm_2003, t_UKfm_2003, t_WBfm_2003]
                  

}

df_All_st_2003 = pd.DataFrame(df_state_2003)
df_All_st_2003
Out[613]:
State Total Male Female
0 A & N ISLANDS 565 350.0 215.0
1 ANDHRA PRADESH 57045 37565.0 19480.0
2 ARUNACHAL PRADESH 405 270.0 135.0
3 ASSAM 12963 8363.0 4600.0
4 BIHAR 2984 1755.0 1229.0
5 CHANDIGARH 515 340.0 175.0
6 CHHATTISGARH 19595 12960.0 6635.0
7 D & N HAVELI 260 150.0 110.0
8 DAMAN & DIU 118 88.0 30.0
9 DELHI (UT) 5765 3705.0 2060.0
10 GOA 1500 1065.0 435.0
11 GUJARAT 22830 13250.0 9580.0
12 HARYANA 11135 8065.0 3070.0
13 HIMACHAL PRADESH 1926 1196.0 730.0
14 JAMMU & KASHMIR 690 315.0 375.0
15 JHARKHAND 1360 765.0 595.0
16 KARNATAKA 61805 41875.0 19930.0
17 KERALA 47190 34675.0 12515.0
18 LAKSHADWEEP 10 5.0 5.0
19 MADHYA PRADESH 33810 17690.0 16120.0
20 MAHARASHTRA 73800 49050.0 24750.0
21 MANIPUR 130 105.0 25.0
22 MEGHALAYA 205 160.0 45.0
23 MIZORAM 130 205.0 55.0
24 NAGALAND 109 84.0 25.0
25 ODISHA 22100 13700.0 8400.0
26 PUDUCHERRY 2910 1940.0 970.0
27 PUNJAB 3155 2530.0 625.0
28 RAJASTHAN 18305 11945.0 6360.0
29 SIKKIM 525 340.0 185.0
30 TAMIL NADU 59360 35770.0 23590.0
31 TRIPURA 4220 2440.0 1780.0
32 UTTAR PRADESH 18315 9935.0 8380.0
33 UTTARAKHAND 1953 1310.0 643.0
34 WEST BENGAL 66400 37120.0 29280.0
In [614]:
pivot_2003 = pd.pivot_table(df_All_st_2003, values=None, index='State', columns=None,
                       fill_value=None, margins=False, dropna=True, margins_name='All', observed=False)

pivot_2003
Out[614]:
Female Male Total
State
A & N ISLANDS 215.0 350.0 565
ANDHRA PRADESH 19480.0 37565.0 57045
ARUNACHAL PRADESH 135.0 270.0 405
ASSAM 4600.0 8363.0 12963
BIHAR 1229.0 1755.0 2984
CHANDIGARH 175.0 340.0 515
CHHATTISGARH 6635.0 12960.0 19595
D & N HAVELI 110.0 150.0 260
DAMAN & DIU 30.0 88.0 118
DELHI (UT) 2060.0 3705.0 5765
GOA 435.0 1065.0 1500
GUJARAT 9580.0 13250.0 22830
HARYANA 3070.0 8065.0 11135
HIMACHAL PRADESH 730.0 1196.0 1926
JAMMU & KASHMIR 375.0 315.0 690
JHARKHAND 595.0 765.0 1360
KARNATAKA 19930.0 41875.0 61805
KERALA 12515.0 34675.0 47190
LAKSHADWEEP 5.0 5.0 10
MADHYA PRADESH 16120.0 17690.0 33810
MAHARASHTRA 24750.0 49050.0 73800
MANIPUR 25.0 105.0 130
MEGHALAYA 45.0 160.0 205
MIZORAM 55.0 205.0 130
NAGALAND 25.0 84.0 109
ODISHA 8400.0 13700.0 22100
PUDUCHERRY 970.0 1940.0 2910
PUNJAB 625.0 2530.0 3155
RAJASTHAN 6360.0 11945.0 18305
SIKKIM 185.0 340.0 525
TAMIL NADU 23590.0 35770.0 59360
TRIPURA 1780.0 2440.0 4220
UTTAR PRADESH 8380.0 9935.0 18315
UTTARAKHAND 643.0 1310.0 1953
WEST BENGAL 29280.0 37120.0 66400
In [615]:
pivot_2003.plot(kind='bar',figsize=(60,30))

plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("States",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths of Males And Females In Different State",fontsize=55)
plt.legend(["Female","Male","Total"], prop={"size":30})

plt.show
Out[615]:
<function matplotlib.pyplot.show(close=None, block=None)>
In [616]:
cause_l_percent_2003=[]
for i in cause_l_2003:
    p=i/np.sum(cause_l_2003)
    avg_2003_cause=p*100
    cause_l_percent_2003.append(avg_2003_cause)

print(cause_l_percent_2003,end=" ")
[0.5171250302227643, 4.150171953996442, 3.53507103702875, 1.4355361969477713, 0.09815632115882197, 1.8756157324374163, 5.876929294970571, 0.12576278648474068, 0.1028476159200892, 0.08859329722239263, 0.0216521296673872, 0.19956046176775205, 0.2491799255888477, 0.07740636356090924, 0.5396793319596259, 0.1355062448350649, 0.1683453081639355, 0.11764323785947046, 3.1812391513808644, 0.18223875803384226, 0.16347357898877338, 0.055573799479627144, 0.2033495844595448, 0.441523010800804, 0.31810587169669696, 0.40687960333298456, 0.16455618547214274, 4.746868560746854, 3.0969762800919494, 0.3796340068348556, 4.20430227816491, 1.507529528091834, 0.04366512816256419, 0.044928169059828445, 0.13875406428517298, 1.321321212952304, 0.7210159179239938, 13.92015416316323, 3.3456149024391126, 4.601618857561466, 4.355145448181041, 4.684799122367011, 0.13207799097106193, 2.821272495660552, 9.791273470006386, 0.09274328874197518, 0.09075851018913135, 0.08336069921944073, 0.4819403195132601, 5.23530451916033, 0.5530314785878481, 0.1818778892060525, 0.27335813705076345, 0.5214554561562418, 0.19162134755637675, 1.0245066020952045, 0.5326423898177252, 0.42095348761678614, 1.46314266227369, 1.0990260150337954, 0.2329408283383073, 1.7886463449400778, 0.45397298535955166, 0.9900436290412798] 
In [617]:
np.max(cause_l_percent_2003) #Married
Out[617]:
13.92015416316323
In [618]:
np.min(cause_l_percent_2003)  #Ideological Causes/Hero Worshipping
Out[618]:
0.0216521296673872
In [619]:
state_s_2003_percent=[]
tot=np.sum(state_s_2003)
for i in state_s_2003:
    xy=i/tot
    avg_state_2003=xy*100
    state_s_2003_percent.append(avg_state_2003)

print(state_s_2003_percent,end=" ")
[0.10196936226736547, 10.295296054056395, 0.07309308268722658, 2.339520076233378, 0.5385426141695904, 0.09294552489857207, 3.536441864830135, 0.046923954317725704, 0.021296256190352435, 1.0404484486218797, 0.27071512106380213, 4.120284142591069, 2.009608582030291, 0.34759821544592195, 0.12452895568934898, 0.24544837643118061, 11.154365371565527, 8.516697708667214, 0.001804767473758681, 6.1019188287781, 13.319183956339064, 0.023461977158862852, 0.03699773321205296, 0.023461977158862852, 0.019671965463969623, 3.988536117006685, 0.5251873348637761, 0.5694041379708639, 3.3036268607152657, 0.09475029237233075, 10.71309972423153, 0.7616118739261634, 3.305431628189024, 0.3524710876250704, 11.983656025757641] 
In [620]:
np.max(state_s_2003_percent) #Maharashtra
Out[620]:
13.319183956339064
In [621]:
np.min(state_s_2003_percent)  #Lakshdweep
Out[621]:
0.001804767473758681
In [622]:
l_age_grp_2003=[s3_4,s3_5,s3_6,s3_7,s3_8,s3_54]
l_age_grp_2003
Out[622]:
[7728, 119483, 111042, 66991, 27272, 221702]
In [623]:
l_age_grp_2003_percent=[]
for i in l_age_grp_2003:
    yz=i/s3_1
    avg_2003_age_grp=yz*100
    l_age_grp_2003_percent.append(avg_2003_age_grp)
l_age_grp_2003_percent
Out[623]:
[1.394397150579736,
 21.55884507540354,
 20.035798187716747,
 12.0874818212328,
 4.920807335741531,
 40.00267042932564]
In [624]:
np.max(l_age_grp_2003_percent)  #0-100+
Out[624]:
40.00267042932564
In [625]:
np.min(l_age_grp_2003_percent)  #0-14
Out[625]:
1.394397150579736
In [626]:
total_male_percent_2003= (s3_2/s3_1)*100
total_male_percent_2003
Out[626]:
63.347094464633045
In [627]:
total_female_percent_2003= (s3_3/s3_1)*100
total_female_percent_2003
Out[627]:
36.65290553536695
In [ ]:
 

2004

In [628]:
df_2004 = suicide_df.loc[(suicide_df["Year"]==2004)]

df_2004
Out[628]:
State Year Type Gender Age_group Total
63 A & N ISLANDS 2004 Cancer Male 15-29 0
64 A & N ISLANDS 2004 Divorce Male 60+ 0
65 A & N ISLANDS 2004 Fall in Social Reputation Male 0-14 0
66 A & N ISLANDS 2004 Other Prolonged Illness Male 30-44 4
67 A & N ISLANDS 2004 Paralysis Male 45-59 0
... ... ... ... ... ... ...
236437 WEST BENGAL 2004 By touching electric wires Male 45-59 5
236438 WEST BENGAL 2004 Others Female 15-29 284
236439 WEST BENGAL 2004 Retired Person Female 30-44 0
236440 WEST BENGAL 2004 Service (Private) Female 0-14 0
236441 WEST BENGAL 2004 Seperated Female 0-100+ 250

19705 rows × 6 columns

In [629]:
t2004_dcount = df_2004.loc[:,"Total"]

s4_1 = np.sum(t2004_dcount)

s4_1
Out[629]:
568349
In [630]:
male_2004 = df_2004.loc[(df_2004["Gender"]=="Male")]

male_2004
Out[630]:
State Year Type Gender Age_group Total
63 A & N ISLANDS 2004 Cancer Male 15-29 0
64 A & N ISLANDS 2004 Divorce Male 60+ 0
65 A & N ISLANDS 2004 Fall in Social Reputation Male 0-14 0
66 A & N ISLANDS 2004 Other Prolonged Illness Male 30-44 4
67 A & N ISLANDS 2004 Paralysis Male 45-59 0
... ... ... ... ... ... ...
236431 WEST BENGAL 2004 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 873
236432 WEST BENGAL 2004 Matriculate/Secondary Male 0-100+ 1130
236434 WEST BENGAL 2004 By Jumping off Moving Vehicles/Trains Male 15-29 18
236436 WEST BENGAL 2004 By Self Infliction of injury Male 60+ 1
236437 WEST BENGAL 2004 By touching electric wires Male 45-59 5

9864 rows × 6 columns

In [631]:
m2004_count = male_2004.loc[:,"Total"]
s4_2 = np.sum(m2004_count)

s4_2
Out[631]:
363236
In [632]:
female_2004 = df_2004.loc[(df_2004["Gender"]=="Female")]

female_2004
Out[632]:
State Year Type Gender Age_group Total
69 A & N ISLANDS 2004 Suspected/Illicit Relation Female 15-29 0
70 A & N ISLANDS 2004 Hr. Secondary/Intermediate/Pre-Universit Female 0-100+ 5
71 A & N ISLANDS 2004 By Consuming Insecticides Female 0-14 0
72 A & N ISLANDS 2004 By Consuming Insecticides Female 15-29 0
76 A & N ISLANDS 2004 Others Female 30-44 0
... ... ... ... ... ... ...
236435 WEST BENGAL 2004 By Over Alcoholism Female 60+ 1
236438 WEST BENGAL 2004 Others Female 15-29 284
236439 WEST BENGAL 2004 Retired Person Female 30-44 0
236440 WEST BENGAL 2004 Service (Private) Female 0-14 0
236441 WEST BENGAL 2004 Seperated Female 0-100+ 250

9841 rows × 6 columns

In [633]:
fm2004_count = female_2004.loc[:,"Total"]
s4_3 = np.sum(fm2004_count)
s4_3
Out[633]:
205113
In [634]:
df_age_d014_2004 = df_2004.loc[(df_2004["Age_group"]=="0-14")]

df_age_d014_2004
Out[634]:
State Year Type Gender Age_group Total
65 A & N ISLANDS 2004 Fall in Social Reputation Male 0-14 0
71 A & N ISLANDS 2004 By Consuming Insecticides Female 0-14 0
74 A & N ISLANDS 2004 By Jumping from (Other sites) Male 0-14 0
77 A & N ISLANDS 2004 By Over Alcoholism Male 0-14 0
78 A & N ISLANDS 2004 By touching electric wires Male 0-14 0
... ... ... ... ... ... ...
236202 UTTARAKHAND 2004 By Machine Male 0-14 0
236204 UTTARAKHAND 2004 House Wife Male 0-14 0
236425 WEST BENGAL 2004 Family Problems Female 0-14 9
236433 WEST BENGAL 2004 By Consuming Other Poison Female 0-14 131
236440 WEST BENGAL 2004 Service (Private) Female 0-14 0

3749 rows × 6 columns

In [635]:
t_014_2004 = df_age_d014_2004.loc[:,"Total"]

s4_4 = np.sum(t_014_2004)
s4_4
Out[635]:
8733
In [636]:
df_age_d1529_2004 = df_2004.loc[(df_2004["Age_group"]=="15-29")]

df_age_d1529_2004
Out[636]:
State Year Type Gender Age_group Total
63 A & N ISLANDS 2004 Cancer Male 15-29 0
68 A & N ISLANDS 2004 Property Dispute Male 15-29 0
69 A & N ISLANDS 2004 Suspected/Illicit Relation Female 15-29 0
72 A & N ISLANDS 2004 By Consuming Insecticides Female 15-29 0
128 A & N ISLANDS 2004 Others Male 15-29 1
... ... ... ... ... ... ...
236423 WEST BENGAL 2004 Bankruptcy or Sudden change in Economic Male 15-29 16
236426 WEST BENGAL 2004 Ideological Causes/Hero Worshipping Male 15-29 0
236430 WEST BENGAL 2004 Property Dispute Female 15-29 31
236434 WEST BENGAL 2004 By Jumping off Moving Vehicles/Trains Male 15-29 18
236438 WEST BENGAL 2004 Others Female 15-29 284

3766 rows × 6 columns

In [637]:
t_1529_2004 = df_age_d1529_2004.loc[:,"Total"]

s4_5 = np.sum(t_1529_2004)

s4_5
Out[637]:
120407
In [638]:
df_age_d3044_2004 = df_2004.loc[(df_2004["Age_group"]=="30-44")]

df_age_d3044_2004
Out[638]:
State Year Type Gender Age_group Total
66 A & N ISLANDS 2004 Other Prolonged Illness Male 30-44 4
76 A & N ISLANDS 2004 Others Female 30-44 0
79 A & N ISLANDS 2004 Farming/Agriculture Activity Female 30-44 0
127 A & N ISLANDS 2004 Failure in Examination Male 30-44 0
130 A & N ISLANDS 2004 Poverty Male 30-44 0
... ... ... ... ... ... ...
236196 UTTARAKHAND 2004 By coming under running vehicles/trains Male 30-44 0
236200 UTTARAKHAND 2004 By Jumping off Moving Vehicles/Trains Male 30-44 0
236428 WEST BENGAL 2004 Poverty Female 30-44 2
236429 WEST BENGAL 2004 Professional/Career Problem Female 30-44 2
236439 WEST BENGAL 2004 Retired Person Female 30-44 0

3767 rows × 6 columns

In [639]:
t_3044_2004 = df_age_d3044_2004.loc[:,"Total"]

s4_6 = np.sum(t_3044_2004)
s4_6
Out[639]:
114872
In [640]:
df_age_d4559_2004 = df_2004.loc[(df_2004["Age_group"]=="45-59")]

df_age_d4559_2004
Out[640]:
State Year Type Gender Age_group Total
67 A & N ISLANDS 2004 Paralysis Male 45-59 0
73 A & N ISLANDS 2004 By Drowning Male 45-59 1
129 A & N ISLANDS 2004 Other Prolonged Illness Female 45-59 1
132 A & N ISLANDS 2004 By Fire-Arms Male 45-59 0
133 A & N ISLANDS 2004 Others Male 45-59 0
... ... ... ... ... ... ...
235981 UTTAR PRADESH 2004 Service (Government) Female 45-59 0
236191 UTTARAKHAND 2004 Suspected/Illicit Relation Female 45-59 0
236199 UTTARAKHAND 2004 By Jumping from (Other sites) Female 45-59 0
236203 UTTARAKHAND 2004 By touching electric wires Female 45-59 0
236437 WEST BENGAL 2004 By touching electric wires Male 45-59 5

3760 rows × 6 columns

In [641]:
t_4559_2004 = df_age_d4559_2004.loc[:,"Total"]

s4_7 = np.sum(t_4559_2004)

s4_7
Out[641]:
69400
In [642]:
df_age_d60_2004 = df_2004.loc[(df_2004["Age_group"]=="60+")]

df_age_d60_2004
Out[642]:
State Year Type Gender Age_group Total
64 A & N ISLANDS 2004 Divorce Male 60+ 0
75 A & N ISLANDS 2004 By Machine Male 60+ 0
206 A & N ISLANDS 2004 Causes Not known Female 60+ 0
294 A & N ISLANDS 2004 Bankruptcy or Sudden change in Economic Female 60+ 0
297 A & N ISLANDS 2004 Cancellation/Non-Settlement of Marriage Female 60+ 0
... ... ... ... ... ... ...
236207 UTTARAKHAND 2004 Public Sector Undertaking Female 60+ 0
236424 WEST BENGAL 2004 Cancellation/Non-Settlement of Marriage Female 60+ 0
236427 WEST BENGAL 2004 Other Prolonged Illness Male 60+ 86
236435 WEST BENGAL 2004 By Over Alcoholism Female 60+ 1
236436 WEST BENGAL 2004 By Self Infliction of injury Male 60+ 1

3753 rows × 6 columns

In [643]:
t_60_2004 = df_age_d60_2004.loc[:,"Total"]

s4_8 = np.sum(t_60_2004)
s4_8
Out[643]:
27543
In [644]:
df_age_d0100_2004 = df_2004.loc[(df_2004["Age_group"]=="0-100+")]

df_age_d0100_2004
Out[644]:
State Year Type Gender Age_group Total
70 A & N ISLANDS 2004 Hr. Secondary/Intermediate/Pre-Universit Female 0-100+ 5
134 A & N ISLANDS 2004 Never Married Female 0-100+ 15
209 A & N ISLANDS 2004 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 9
307 A & N ISLANDS 2004 Matriculate/Secondary Male 0-100+ 19
375 A & N ISLANDS 2004 No Education Male 0-100+ 5
... ... ... ... ... ... ...
236194 UTTARAKHAND 2004 Middle Male 0-100+ 28
236195 UTTARAKHAND 2004 Post Graduate and Above Male 0-100+ 2
236431 WEST BENGAL 2004 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 873
236432 WEST BENGAL 2004 Matriculate/Secondary Male 0-100+ 1130
236441 WEST BENGAL 2004 Seperated Female 0-100+ 250

910 rows × 6 columns

In [645]:
t_0100_2004 = df_age_d0100_2004.loc[:,"Total"]

s4_54 = np.sum(t_0100_2004)
s4_54
Out[645]:
227394
In [646]:
df_014m_2004 = df_age_d014_2004.loc[(df_age_d014_2004["Gender"]=="Male")]
df_014m_2004
Out[646]:
State Year Type Gender Age_group Total
65 A & N ISLANDS 2004 Fall in Social Reputation Male 0-14 0
74 A & N ISLANDS 2004 By Jumping from (Other sites) Male 0-14 0
77 A & N ISLANDS 2004 By Over Alcoholism Male 0-14 0
78 A & N ISLANDS 2004 By touching electric wires Male 0-14 0
131 A & N ISLANDS 2004 Unemployment Male 0-14 0
... ... ... ... ... ... ...
235971 UTTAR PRADESH 2004 Family Problems Male 0-14 26
236184 UTTARAKHAND 2004 Divorce Male 0-14 0
236185 UTTARAKHAND 2004 Drug Abuse/Addiction Male 0-14 0
236202 UTTARAKHAND 2004 By Machine Male 0-14 0
236204 UTTARAKHAND 2004 House Wife Male 0-14 0

1874 rows × 6 columns

In [647]:
t_014m_2004 = df_014m_2004.loc[:,"Total"]

s4_9 = np.sum(t_014m_2004)
s4_9
Out[647]:
4400
In [648]:
df_014fm_2004 = df_age_d014_2004.loc[(df_age_d014_2004["Gender"]=="Female")]
df_014fm_2004
Out[648]:
State Year Type Gender Age_group Total
71 A & N ISLANDS 2004 By Consuming Insecticides Female 0-14 0
125 A & N ISLANDS 2004 Bankruptcy or Sudden change in Economic Female 0-14 0
126 A & N ISLANDS 2004 Cancellation/Non-Settlement of Marriage Female 0-14 0
208 A & N ISLANDS 2004 Physical Abuse (Rape/Incest Etc.) Female 0-14 0
213 A & N ISLANDS 2004 By Jumping from (Building) Female 0-14 0
... ... ... ... ... ... ...
235794 TRIPURA 2004 Professional/Career Problem Female 0-14 0
235972 UTTAR PRADESH 2004 Not having Children(Barrenness/Impotency Female 0-14 0
236425 WEST BENGAL 2004 Family Problems Female 0-14 9
236433 WEST BENGAL 2004 By Consuming Other Poison Female 0-14 131
236440 WEST BENGAL 2004 Service (Private) Female 0-14 0

1875 rows × 6 columns

In [649]:
t_014fm_2004 = df_014fm_2004.loc[:,"Total"]

s4_10 = np.sum(t_014fm_2004)
s4_10
Out[649]:
4333
In [650]:
df_1529m_2004 = df_age_d1529_2004.loc[(df_age_d1529_2004["Gender"]=="Male")]
df_1529m_2004
Out[650]:
State Year Type Gender Age_group Total
63 A & N ISLANDS 2004 Cancer Male 15-29 0
68 A & N ISLANDS 2004 Property Dispute Male 15-29 0
128 A & N ISLANDS 2004 Others Male 15-29 1
215 A & N ISLANDS 2004 By Machine Male 15-29 0
216 A & N ISLANDS 2004 Others Male 15-29 0
... ... ... ... ... ... ...
236186 UTTARAKHAND 2004 Drug Abuse/Addiction Male 15-29 0
236189 UTTARAKHAND 2004 Not having Children(Barrenness/Impotency Male 15-29 0
236423 WEST BENGAL 2004 Bankruptcy or Sudden change in Economic Male 15-29 16
236426 WEST BENGAL 2004 Ideological Causes/Hero Worshipping Male 15-29 0
236434 WEST BENGAL 2004 By Jumping off Moving Vehicles/Trains Male 15-29 18

1884 rows × 6 columns

In [651]:
t_1529m_2004 = df_1529m_2004.loc[:,"Total"]

s4_11 = np.sum(t_1529m_2004)
s4_11
Out[651]:
64850
In [652]:
df_1529fm_2004 = df_age_d1529_2004.loc[(df_age_d1529_2004["Gender"]=="Female")]
df_1529fm_2004
Out[652]:
State Year Type Gender Age_group Total
69 A & N ISLANDS 2004 Suspected/Illicit Relation Female 15-29 0
72 A & N ISLANDS 2004 By Consuming Insecticides Female 15-29 0
296 A & N ISLANDS 2004 Cancellation/Non-Settlement of Marriage Female 15-29 0
300 A & N ISLANDS 2004 Ideological Causes/Hero Worshipping Female 15-29 0
369 A & N ISLANDS 2004 Illness (Aids/STD) Female 15-29 0
... ... ... ... ... ... ...
236197 UTTARAKHAND 2004 By Fire-Arms Female 15-29 0
236205 UTTARAKHAND 2004 Professional Activity Female 15-29 0
236206 UTTARAKHAND 2004 Public Sector Undertaking Female 15-29 0
236430 WEST BENGAL 2004 Property Dispute Female 15-29 31
236438 WEST BENGAL 2004 Others Female 15-29 284

1882 rows × 6 columns

In [653]:
t_1529fm_2004 = df_1529fm_2004.loc[:,"Total"]

s4_12 = np.sum(t_1529fm_2004)
s4_12
Out[653]:
55557
In [654]:
df_3044m_2004 = df_age_d3044_2004.loc[(df_age_d3044_2004["Gender"]=="Male")]
df_3044m_2004
Out[654]:
State Year Type Gender Age_group Total
66 A & N ISLANDS 2004 Other Prolonged Illness Male 30-44 4
127 A & N ISLANDS 2004 Failure in Examination Male 30-44 0
130 A & N ISLANDS 2004 Poverty Male 30-44 0
366 A & N ISLANDS 2004 Dowry Dispute Male 30-44 0
371 A & N ISLANDS 2004 Others Male 30-44 4
... ... ... ... ... ... ...
235982 UTTAR PRADESH 2004 Student Male 30-44 8
236187 UTTARAKHAND 2004 Insanity/Mental Illness Male 30-44 5
236192 UTTARAKHAND 2004 Unemployment Male 30-44 3
236196 UTTARAKHAND 2004 By coming under running vehicles/trains Male 30-44 0
236200 UTTARAKHAND 2004 By Jumping off Moving Vehicles/Trains Male 30-44 0

1886 rows × 6 columns

In [655]:
t_3044m_2004 = df_3044m_2004.loc[:,"Total"]

s4_13 = np.sum(t_3044m_2004)
s4_13
Out[655]:
77535
In [656]:
df_3044fm_2004 = df_age_d3044_2004.loc[(df_age_d3044_2004["Gender"]=="Female")]
df_3044fm_2004
Out[656]:
State Year Type Gender Age_group Total
76 A & N ISLANDS 2004 Others Female 30-44 0
79 A & N ISLANDS 2004 Farming/Agriculture Activity Female 30-44 0
205 A & N ISLANDS 2004 Cancellation/Non-Settlement of Marriage Female 30-44 0
207 A & N ISLANDS 2004 Divorce Female 30-44 0
214 A & N ISLANDS 2004 By Machine Female 30-44 0
... ... ... ... ... ... ...
235979 UTTAR PRADESH 2004 Professional Activity Female 30-44 5
236183 UTTARAKHAND 2004 Death of Dear Person Female 30-44 0
236428 WEST BENGAL 2004 Poverty Female 30-44 2
236429 WEST BENGAL 2004 Professional/Career Problem Female 30-44 2
236439 WEST BENGAL 2004 Retired Person Female 30-44 0

1881 rows × 6 columns

In [657]:
t_3044fm_2004 = df_3044fm_2004.loc[:,"Total"]

s4_14 = np.sum(t_3044fm_2004)
s4_14
Out[657]:
37337
In [658]:
df_4559m_2004 = df_age_d4559_2004.loc[(df_age_d4559_2004["Gender"]=="Male")]
df_4559m_2004
Out[658]:
State Year Type Gender Age_group Total
67 A & N ISLANDS 2004 Paralysis Male 45-59 0
73 A & N ISLANDS 2004 By Drowning Male 45-59 1
132 A & N ISLANDS 2004 By Fire-Arms Male 45-59 0
133 A & N ISLANDS 2004 Others Male 45-59 0
211 A & N ISLANDS 2004 By Consuming Insecticides Male 45-59 0
... ... ... ... ... ... ...
235129 RAJASTHAN 2004 Property Dispute Male 45-59 7
235348 SIKKIM 2004 By Fire/Self Immolation Male 45-59 0
235568 TAMIL NADU 2004 Fall in Social Reputation Male 45-59 5
235575 TAMIL NADU 2004 By Fire-Arms Male 45-59 0
236437 WEST BENGAL 2004 By touching electric wires Male 45-59 5

1883 rows × 6 columns

In [659]:
t_4559m_2004 = df_4559m_2004.loc[:,"Total"]

s4_15 = np.sum(t_4559m_2004)
s4_15
Out[659]:
51193
In [660]:
df_4559fm_2004 = df_age_d4559_2004.loc[(df_age_d4559_2004["Gender"]=="Female")]
df_4559fm_2004
Out[660]:
State Year Type Gender Age_group Total
129 A & N ISLANDS 2004 Other Prolonged Illness Female 45-59 1
212 A & N ISLANDS 2004 By Drowning Female 45-59 0
313 A & N ISLANDS 2004 Service (Private) Female 45-59 0
364 A & N ISLANDS 2004 Bankruptcy or Sudden change in Economic Female 45-59 0
378 A & N ISLANDS 2004 By Jumping off Moving Vehicles/Trains Female 45-59 0
... ... ... ... ... ... ...
235975 UTTAR PRADESH 2004 By Hanging Female 45-59 43
235981 UTTAR PRADESH 2004 Service (Government) Female 45-59 0
236191 UTTARAKHAND 2004 Suspected/Illicit Relation Female 45-59 0
236199 UTTARAKHAND 2004 By Jumping from (Other sites) Female 45-59 0
236203 UTTARAKHAND 2004 By touching electric wires Female 45-59 0

1877 rows × 6 columns

In [661]:
t_4559fm_2004 = df_4559fm_2004.loc[:,"Total"]

s4_16 = np.sum(t_4559fm_2004)
s4_16
Out[661]:
18207
In [662]:
df_60m_2004 = df_age_d60_2004.loc[(df_age_d60_2004["Gender"]=="Male")]
df_60m_2004
Out[662]:
State Year Type Gender Age_group Total
64 A & N ISLANDS 2004 Divorce Male 60+ 0
75 A & N ISLANDS 2004 By Machine Male 60+ 0
298 A & N ISLANDS 2004 Causes Not known Male 60+ 1
306 A & N ISLANDS 2004 Professional/Career Problem Male 60+ 0
310 A & N ISLANDS 2004 Others Male 60+ 0
... ... ... ... ... ... ...
236190 UTTARAKHAND 2004 Not having Children(Barrenness/Impotency Male 60+ 0
236193 UTTARAKHAND 2004 Unemployment Male 60+ 0
236201 UTTARAKHAND 2004 By Jumping off Moving Vehicles/Trains Male 60+ 0
236427 WEST BENGAL 2004 Other Prolonged Illness Male 60+ 86
236436 WEST BENGAL 2004 By Self Infliction of injury Male 60+ 1

1882 rows × 6 columns

In [663]:
t_60m_2004 = df_60m_2004.loc[:,"Total"]

s4_17 = np.sum(t_60m_2004)
s4_17
Out[663]:
19956
In [664]:
df_60fm_2004 = df_age_d60_2004.loc[(df_age_d60_2004["Gender"]=="Female")]
df_60fm_2004
Out[664]:
State Year Type Gender Age_group Total
206 A & N ISLANDS 2004 Causes Not known Female 60+ 0
294 A & N ISLANDS 2004 Bankruptcy or Sudden change in Economic Female 60+ 0
297 A & N ISLANDS 2004 Cancellation/Non-Settlement of Marriage Female 60+ 0
314 A & N ISLANDS 2004 Student Female 60+ 0
365 A & N ISLANDS 2004 Cancer Female 60+ 0
... ... ... ... ... ... ...
235793 TRIPURA 2004 Poverty Female 60+ 0
236198 UTTARAKHAND 2004 By Fire-Arms Female 60+ 0
236207 UTTARAKHAND 2004 Public Sector Undertaking Female 60+ 0
236424 WEST BENGAL 2004 Cancellation/Non-Settlement of Marriage Female 60+ 0
236435 WEST BENGAL 2004 By Over Alcoholism Female 60+ 1

1871 rows × 6 columns

In [665]:
t_60fm_2004 = df_60fm_2004.loc[:,"Total"]

s4_18 = np.sum(t_60fm_2004)
s4_18
Out[665]:
7587
In [666]:
df_0100fm_2004 = df_age_d0100_2004.loc[(df_age_d0100_2004["Gender"]=="Female")]
df_0100fm_2004
Out[666]:
State Year Type Gender Age_group Total
70 A & N ISLANDS 2004 Hr. Secondary/Intermediate/Pre-Universit Female 0-100+ 5
134 A & N ISLANDS 2004 Never Married Female 0-100+ 15
385 A & N ISLANDS 2004 Married Female 0-100+ 26
386 A & N ISLANDS 2004 Seperated Female 0-100+ 0
387 A & N ISLANDS 2004 Widowed/Widower Female 0-100+ 0
... ... ... ... ... ... ...
234924 PUNJAB 2004 Graduate Female 0-100+ 1
235345 SIKKIM 2004 Graduate Female 0-100+ 0
235346 SIKKIM 2004 Hr. Secondary/Intermediate/Pre-Universit Female 0-100+ 0
235796 TRIPURA 2004 Primary Female 0-100+ 107
236441 WEST BENGAL 2004 Seperated Female 0-100+ 250

455 rows × 6 columns

In [667]:
t_0100fm_2004 = df_0100fm_2004.loc[:,"Total"]

s4_55 = np.sum(t_0100fm_2004)
s4_55
Out[667]:
82092
In [668]:
df_0100m_2004 = df_age_d0100_2004.loc[(df_age_d0100_2004["Gender"]=="Male")]
df_0100m_2004
Out[668]:
State Year Type Gender Age_group Total
209 A & N ISLANDS 2004 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 9
307 A & N ISLANDS 2004 Matriculate/Secondary Male 0-100+ 19
375 A & N ISLANDS 2004 No Education Male 0-100+ 5
1097 A & N ISLANDS 2004 Post Graduate and Above Male 0-100+ 0
1277 A & N ISLANDS 2004 Graduate Male 0-100+ 1
... ... ... ... ... ... ...
235795 TRIPURA 2004 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 35
236194 UTTARAKHAND 2004 Middle Male 0-100+ 28
236195 UTTARAKHAND 2004 Post Graduate and Above Male 0-100+ 2
236431 WEST BENGAL 2004 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 873
236432 WEST BENGAL 2004 Matriculate/Secondary Male 0-100+ 1130

455 rows × 6 columns

In [669]:
t_0100m_2004 = df_0100m_2004.loc[:,"Total"]

s4_56 = np.sum(t_0100m_2004)
s4_56
Out[669]:
145302
In [670]:
df_st_AN_2004 = df_2004.loc[(df_2004["State"]=="A & N ISLANDS")]

df_st_AN_2004
Out[670]:
State Year Type Gender Age_group Total
63 A & N ISLANDS 2004 Cancer Male 15-29 0
64 A & N ISLANDS 2004 Divorce Male 60+ 0
65 A & N ISLANDS 2004 Fall in Social Reputation Male 0-14 0
66 A & N ISLANDS 2004 Other Prolonged Illness Male 30-44 4
67 A & N ISLANDS 2004 Paralysis Male 45-59 0
... ... ... ... ... ... ...
5169 A & N ISLANDS 2004 Professional Activity Female 30-44 0
5170 A & N ISLANDS 2004 Public Sector Undertaking Female 45-59 0
5171 A & N ISLANDS 2004 Self-employed (Business activity) Female 30-44 0
5172 A & N ISLANDS 2004 Self-employed (Business activity) Female 60+ 0
5173 A & N ISLANDS 2004 Unemployed Male 60+ 0

560 rows × 6 columns

In [671]:
t_AN_2004 = df_st_AN_2004.loc[:,"Total"]

s4_19 = np.sum(t_AN_2004)
s4_19
Out[671]:
610
In [672]:
df_st_AP_2004 = df_2004.loc[(df_2004["State"]=="ANDHRA PRADESH")]

df_st_AP_2004
Out[672]:
State Year Type Gender Age_group Total
5094 ANDHRA PRADESH 2004 Cancer Female 15-29 8
5095 ANDHRA PRADESH 2004 Death of Dear Person Male 30-44 16
5096 ANDHRA PRADESH 2004 Physical Abuse (Rape/Incest Etc.) Male 60+ 0
5097 ANDHRA PRADESH 2004 Poverty Female 60+ 27
5098 ANDHRA PRADESH 2004 Primary Female 0-100+ 995
... ... ... ... ... ... ...
229390 ANDHRA PRADESH 2004 By Machine Female 60+ 0
229391 ANDHRA PRADESH 2004 By Overdose of sleeping pills Male 30-44 42
229392 ANDHRA PRADESH 2004 By Self Infliction of injury Female 45-59 0
229393 ANDHRA PRADESH 2004 Retired Person Female 0-14 0
229394 ANDHRA PRADESH 2004 Service (Government) Female 45-59 1

566 rows × 6 columns

In [673]:
t_AP_2004 = df_st_AP_2004.loc[:,"Total"]

s4_20 = np.sum(t_AP_2004)
s4_20
Out[673]:
67630
In [674]:
df_st_ARP_2004 = df_2004.loc[(df_2004["State"]=="ARUNACHAL PRADESH")]

df_st_ARP_2004
Out[674]:
State Year Type Gender Age_group Total
11844 ARUNACHAL PRADESH 2004 Fall in Social Reputation Female 45-59 0
11845 ARUNACHAL PRADESH 2004 Illegitimate Pregnancy Female 45-59 0
11846 ARUNACHAL PRADESH 2004 Illegitimate Pregnancy Male 0-14 0
11847 ARUNACHAL PRADESH 2004 Illness (Aids/STD) Male 15-29 0
11848 ARUNACHAL PRADESH 2004 Insanity/Mental Illness Female 60+ 0
... ... ... ... ... ... ...
229599 ARUNACHAL PRADESH 2004 By Fire-Arms Female 45-59 0
229600 ARUNACHAL PRADESH 2004 By Jumping from (Building) Male 60+ 0
229601 ARUNACHAL PRADESH 2004 Others Female 60+ 0
229602 ARUNACHAL PRADESH 2004 By touching electric wires Male 0-14 0
229603 ARUNACHAL PRADESH 2004 Service (Private) Female 45-59 0

556 rows × 6 columns

In [675]:
t_ARP_2004 = df_st_ARP_2004.loc[:,"Total"]

s4_21 = np.sum(t_ARP_2004)
s4_21
Out[675]:
395
In [676]:
df_st_AS_2004 = df_2004.loc[(df_2004["State"]=="ASSAM")]

df_st_AS_2004
Out[676]:
State Year Type Gender Age_group Total
17001 ASSAM 2004 Divorce Female 30-44 7
17002 ASSAM 2004 Divorce Male 15-29 1
17003 ASSAM 2004 Failure in Examination Male 0-14 8
17004 ASSAM 2004 Family Problems Male 15-29 56
17005 ASSAM 2004 Love Affairs Female 60+ 0
... ... ... ... ... ... ...
229804 ASSAM 2004 Farming/Agriculture Activity Female 15-29 8
229805 ASSAM 2004 House Wife Male 30-44 0
229806 ASSAM 2004 Others Female 30-44 57
229807 ASSAM 2004 Retired Person Male 15-29 0
229808 ASSAM 2004 Self-employed (Business activity) Female 15-29 16

564 rows × 6 columns

In [677]:
t_AS_2004 = df_st_AS_2004.loc[:,"Total"]

s4_22 = np.sum(t_AS_2004)
s4_22
Out[677]:
14178
In [678]:
df_st_BH_2004 = df_2004.loc[(df_2004["State"]=="BIHAR")]

df_st_BH_2004
Out[678]:
State Year Type Gender Age_group Total
22016 BIHAR 2004 Death of Dear Person Female 60+ 0
22017 BIHAR 2004 Death of Dear Person Male 45-59 0
22018 BIHAR 2004 Divorce Male 45-59 0
22019 BIHAR 2004 Dowry Dispute Female 15-29 4
22020 BIHAR 2004 Ideological Causes/Hero Worshipping Female 15-29 1
... ... ... ... ... ... ...
230023 BIHAR 2004 Public Sector Undertaking Female 30-44 0
230024 BIHAR 2004 Retired Person Male 0-14 0
230025 BIHAR 2004 Self-employed (Business activity) Female 60+ 0
230026 BIHAR 2004 Service (Government) Male 45-59 4
230027 BIHAR 2004 Student Male 60+ 0

566 rows × 6 columns

In [679]:
t_BH_2004 = df_st_BH_2004.loc[:,"Total"]

s4_23 = np.sum(t_BH_2004)
s4_23
Out[679]:
1755
In [680]:
df_st_CH_2004 = df_2004.loc[(df_2004["State"]=="CHANDIGARH")]

df_st_CH_2004
Out[680]:
State Year Type Gender Age_group Total
27376 CHANDIGARH 2004 Bankruptcy or Sudden change in Economic Male 45-59 0
27377 CHANDIGARH 2004 Death of Dear Person Female 15-29 0
27378 CHANDIGARH 2004 Death of Dear Person Female 60+ 0
27379 CHANDIGARH 2004 Dowry Dispute Female 45-59 0
27380 CHANDIGARH 2004 Drug Abuse/Addiction Female 0-14 0
... ... ... ... ... ... ...
230236 CHANDIGARH 2004 Professional Activity Male 15-29 0
230237 CHANDIGARH 2004 Public Sector Undertaking Male 15-29 0
230238 CHANDIGARH 2004 Public Sector Undertaking Male 60+ 0
230239 CHANDIGARH 2004 Self-employed (Business activity) Male 15-29 0
230240 CHANDIGARH 2004 Student Female 15-29 8

561 rows × 6 columns

In [681]:
t_CH_2004 = df_st_CH_2004.loc[:,"Total"]

s4_24 = np.sum(t_CH_2004)
s4_24
Out[681]:
375
In [682]:
df_st_CT_2004 = df_2004.loc[(df_2004["State"]=="CHHATTISGARH")]

df_st_CT_2004
Out[682]:
State Year Type Gender Age_group Total
35666 CHHATTISGARH 2004 Cancellation/Non-Settlement of Marriage Female 30-44 0
35667 CHHATTISGARH 2004 Death of Dear Person Female 45-59 2
35668 CHHATTISGARH 2004 Drug Abuse/Addiction Male 30-44 17
35669 CHHATTISGARH 2004 Fall in Social Reputation Male 45-59 5
35670 CHHATTISGARH 2004 Illegitimate Pregnancy Male 45-59 0
... ... ... ... ... ... ...
230470 CHHATTISGARH 2004 By Fire/Self Immolation Male 15-29 22
230471 CHHATTISGARH 2004 By Fire-Arms Male 0-14 0
230472 CHHATTISGARH 2004 Professional Activity Male 0-14 0
230473 CHHATTISGARH 2004 Public Sector Undertaking Male 0-14 0
230474 CHHATTISGARH 2004 Service (Private) Male 15-29 25

566 rows × 6 columns

In [683]:
t_CT_2004 = df_st_CT_2004.loc[:,"Total"]

s4_25 = np.sum(t_CT_2004)
s4_25
Out[683]:
22475
In [684]:
df_st_DN_2004 = df_2004.loc[(df_2004["State"]=="D & N HAVELI")]

df_st_DN_2004
Out[684]:
State Year Type Gender Age_group Total
41519 D & N HAVELI 2004 Bankruptcy or Sudden change in Economic Female 30-44 0
41520 D & N HAVELI 2004 Cancellation/Non-Settlement of Marriage Male 0-14 0
41521 D & N HAVELI 2004 Divorce Male 60+ 0
41522 D & N HAVELI 2004 Dowry Dispute Female 60+ 0
41523 D & N HAVELI 2004 Drug Abuse/Addiction Female 45-59 0
... ... ... ... ... ... ...
230682 D & N HAVELI 2004 By Over Alcoholism Male 15-29 0
230683 D & N HAVELI 2004 By touching electric wires Male 60+ 0
230684 D & N HAVELI 2004 House Wife Female 0-14 0
230685 D & N HAVELI 2004 House Wife Female 15-29 9
230686 D & N HAVELI 2004 Unemployed Male 0-14 0

560 rows × 6 columns

In [685]:
t_DN_2004 = df_st_DN_2004.loc[:,"Total"]

s4_26 = np.sum(t_DN_2004)
s4_26
Out[685]:
195
In [686]:
df_st_DD_2004 = df_2004.loc[(df_2004["State"]=="DAMAN & DIU")]

df_st_DD_2004
Out[686]:
State Year Type Gender Age_group Total
48107 DAMAN & DIU 2004 Causes Not known Male 45-59 1
48108 DAMAN & DIU 2004 Family Problems Female 15-29 2
48109 DAMAN & DIU 2004 Family Problems Male 60+ 0
48110 DAMAN & DIU 2004 Insanity/Mental Illness Female 30-44 0
48111 DAMAN & DIU 2004 Love Affairs Male 60+ 0
... ... ... ... ... ... ...
230883 DAMAN & DIU 2004 By Over Alcoholism Male 0-14 0
230884 DAMAN & DIU 2004 House Wife Female 45-59 0
230885 DAMAN & DIU 2004 Service (Government) Female 45-59 0
230886 DAMAN & DIU 2004 Service (Private) Male 15-29 1
230887 DAMAN & DIU 2004 Unemployed Male 45-59 0

558 rows × 6 columns

In [687]:
t_DD_2004 = df_st_DD_2004.loc[:,"Total"]

s4_27 = np.sum(t_DD_2004)
s4_27
Out[687]:
65
In [688]:
df_st_DL_2004 = df_2004.loc[(df_2004["State"]=="DELHI (UT)")]

df_st_DL_2004
Out[688]:
State Year Type Gender Age_group Total
53338 DELHI (UT) 2004 Cancellation/Non-Settlement of Marriage Female 15-29 7
53339 DELHI (UT) 2004 Drug Abuse/Addiction Female 30-44 1
53340 DELHI (UT) 2004 Failure in Examination Male 15-29 23
53341 DELHI (UT) 2004 Illegitimate Pregnancy Female 15-29 0
53342 DELHI (UT) 2004 Paralysis Male 30-44 0
... ... ... ... ... ... ...
231092 DELHI (UT) 2004 Retired Person Female 30-44 0
231093 DELHI (UT) 2004 Service (Private) Female 0-14 0
231094 DELHI (UT) 2004 Student Female 15-29 41
231095 DELHI (UT) 2004 Seperated Female 0-100+ 9
231096 DELHI (UT) 2004 Widowed/Widower Male 0-100+ 10

563 rows × 6 columns

In [689]:
t_DL_2004 = df_st_DL_2004.loc[:,"Total"]

s4_28 = np.sum(t_DL_2004)
s4_28
Out[689]:
6277
In [690]:
df_st_GOA_2004 = df_2004.loc[(df_2004["State"]=="GOA")]

df_st_GOA_2004
Out[690]:
State Year Type Gender Age_group Total
59847 GOA 2004 Cancellation/Non-Settlement of Marriage Female 0-14 0
59848 GOA 2004 Failure in Examination Male 30-44 0
59849 GOA 2004 Love Affairs Female 15-29 6
59850 GOA 2004 Other Prolonged Illness Female 0-14 0
59851 GOA 2004 Other Prolonged Illness Male 15-29 0
... ... ... ... ... ... ...
231342 GOA 2004 By Jumping from (Building) Female 30-44 0
231343 GOA 2004 By Jumping from (Building) Female 60+ 0
231344 GOA 2004 By Jumping from (Other sites) Female 45-59 0
231345 GOA 2004 House Wife Male 15-29 0
231346 GOA 2004 Public Sector Undertaking Female 15-29 0

566 rows × 6 columns

In [691]:
t_GOA_2004 = df_st_GOA_2004.loc[:,"Total"]

s4_29 = np.sum(t_GOA_2004)
s4_29
Out[691]:
1570
In [692]:
df_st_GJ_2004 = df_2004.loc[(df_2004["State"]=="GUJARAT")]

df_st_GJ_2004
Out[692]:
State Year Type Gender Age_group Total
64988 GUJARAT 2004 Divorce Female 60+ 0
64989 GUJARAT 2004 Illness (Aids/STD) Male 0-14 0
64990 GUJARAT 2004 Love Affairs Male 45-59 3
64991 GUJARAT 2004 Unemployment Female 30-44 15
64992 GUJARAT 2004 By Consuming Insecticides Female 45-59 76
... ... ... ... ... ... ...
231560 GUJARAT 2004 By Over Alcoholism Female 15-29 1
231561 GUJARAT 2004 By Self Infliction of injury Male 15-29 10
231562 GUJARAT 2004 House Wife Female 60+ 59
231563 GUJARAT 2004 Service (Private) Female 0-14 0
231564 GUJARAT 2004 Widowed/Widower Female 0-100+ 101

564 rows × 6 columns

In [693]:
t_GJ_2004 = df_st_GJ_2004.loc[:,"Total"]

s4_30 = np.sum(t_GJ_2004)
s4_30
Out[693]:
23868
In [694]:
df_st_HR_2004 = df_2004.loc[(df_2004["State"]=="HARYANA")]

df_st_HR_2004
Out[694]:
State Year Type Gender Age_group Total
72318 HARYANA 2004 Cancer Male 45-59 7
72319 HARYANA 2004 Cancer Male 60+ 3
72320 HARYANA 2004 Divorce Male 15-29 0
72321 HARYANA 2004 Others Male 45-59 100
72322 HARYANA 2004 Others Male 60+ 29
... ... ... ... ... ... ...
231751 HARYANA 2004 By Drowning Female 15-29 11
231752 HARYANA 2004 By Fire/Self Immolation Female 0-14 0
231753 HARYANA 2004 By Self Infliction of injury Male 15-29 10
231754 HARYANA 2004 Public Sector Undertaking Male 30-44 32
231755 HARYANA 2004 Service (Government) Male 15-29 20

566 rows × 6 columns

In [695]:
t_HR_2004 = df_st_HR_2004.loc[:,"Total"]

s4_31 = np.sum(t_HR_2004)
s4_31
Out[695]:
10410
In [696]:
df_st_HP_2004 = df_2004.loc[(df_2004["State"]=="HIMACHAL PRADESH")]

df_st_HP_2004
Out[696]:
State Year Type Gender Age_group Total
78601 HIMACHAL PRADESH 2004 Bankruptcy or Sudden change in Economic Female 30-44 1
78602 HIMACHAL PRADESH 2004 Cancellation/Non-Settlement of Marriage Male 45-59 0
78603 HIMACHAL PRADESH 2004 Death of Dear Person Female 60+ 0
78604 HIMACHAL PRADESH 2004 Divorce Male 15-29 0
78605 HIMACHAL PRADESH 2004 Dowry Dispute Female 15-29 4
... ... ... ... ... ... ...
232005 HIMACHAL PRADESH 2004 Professional Activity Male 60+ 0
232006 HIMACHAL PRADESH 2004 Public Sector Undertaking Male 30-44 0
232007 HIMACHAL PRADESH 2004 Public Sector Undertaking Male 60+ 0
232008 HIMACHAL PRADESH 2004 Self-employed (Business activity) Male 60+ 0
232009 HIMACHAL PRADESH 2004 Married Male 0-100+ 148

564 rows × 6 columns

In [697]:
t_HP_2004 = df_st_HP_2004.loc[:,"Total"]

s4_32 = np.sum(t_HP_2004)
s4_32
Out[697]:
1840
In [698]:
df_st_JK_2004 = df_2004.loc[(df_2004["State"]=="JAMMU & KASHMIR")]

df_st_JK_2004
Out[698]:
State Year Type Gender Age_group Total
86019 JAMMU & KASHMIR 2004 Bankruptcy or Sudden change in Economic Female 30-44 0
86020 JAMMU & KASHMIR 2004 Cancellation/Non-Settlement of Marriage Male 0-14 0
86021 JAMMU & KASHMIR 2004 Dowry Dispute Female 60+ 0
86022 JAMMU & KASHMIR 2004 Drug Abuse/Addiction Female 45-59 0
86023 JAMMU & KASHMIR 2004 Illness (Aids/STD) Female 0-14 0
... ... ... ... ... ... ...
232217 JAMMU & KASHMIR 2004 By touching electric wires Male 15-29 0
232218 JAMMU & KASHMIR 2004 By touching electric wires Male 60+ 0
232219 JAMMU & KASHMIR 2004 House Wife Female 0-14 0
232220 JAMMU & KASHMIR 2004 Self-employed (Business activity) Female 45-59 0
232221 JAMMU & KASHMIR 2004 Unemployed Male 0-14 0

562 rows × 6 columns

In [699]:
t_JK_2004 = df_st_JK_2004.loc[:,"Total"]

s4_33 = np.sum(t_JK_2004)
s4_33
Out[699]:
560
In [700]:
df_st_JH_2004 = df_2004.loc[(df_2004["State"]=="JHARKHAND")]

df_st_JH_2004
Out[700]:
State Year Type Gender Age_group Total
91745 JHARKHAND 2004 Bankruptcy or Sudden change in Economic Female 45-59 0
91746 JHARKHAND 2004 Cancellation/Non-Settlement of Marriage Female 45-59 0
91747 JHARKHAND 2004 Divorce Male 60+ 0
91748 JHARKHAND 2004 Family Problems Female 15-29 11
91749 JHARKHAND 2004 Illegitimate Pregnancy Male 15-29 0
... ... ... ... ... ... ...
232444 JHARKHAND 2004 By Hanging Female 0-14 0
232445 JHARKHAND 2004 By Hanging Female 15-29 9
232446 JHARKHAND 2004 By Jumping from (Other sites) Female 15-29 2
232447 JHARKHAND 2004 Service (Government) Male 0-14 0
232448 JHARKHAND 2004 Service (Private) Male 45-59 1

565 rows × 6 columns

In [701]:
t_JH_2004 = df_st_JH_2004.loc[:,"Total"]

s4_34 = np.sum(t_JH_2004)
s4_34
Out[701]:
2085
In [702]:
df_st_KN_2004 = df_2004.loc[(df_2004["State"]=="KARNATAKA")]

df_st_KN_2004
Out[702]:
State Year Type Gender Age_group Total
96669 KARNATAKA 2004 Drug Abuse/Addiction Male 15-29 17
96670 KARNATAKA 2004 Fall in Social Reputation Female 60+ 0
96671 KARNATAKA 2004 Ideological Causes/Hero Worshipping Male 45-59 0
96672 KARNATAKA 2004 Illegitimate Pregnancy Female 45-59 0
96673 KARNATAKA 2004 Other Prolonged Illness Female 45-59 165
... ... ... ... ... ... ...
232635 KARNATAKA 2004 Professional Activity Female 0-14 0
232636 KARNATAKA 2004 Public Sector Undertaking Female 0-14 0
232637 KARNATAKA 2004 Public Sector Undertaking Male 15-29 55
232638 KARNATAKA 2004 Service (Government) Female 0-14 0
232639 KARNATAKA 2004 Service (Private) Male 60+ 46

566 rows × 6 columns

In [703]:
t_KN_2004 = df_st_KN_2004.loc[:,"Total"]

s4_35 = np.sum(t_KN_2004)
s4_35
Out[703]:
59685
In [704]:
df_st_KER_2004 = df_2004.loc[(df_2004["State"]=="KERALA")]

df_st_KER_2004
Out[704]:
State Year Type Gender Age_group Total
101534 KERALA 2004 Cancellation/Non-Settlement of Marriage Female 45-59 4
101535 KERALA 2004 Divorce Male 60+ 1
101536 KERALA 2004 Failure in Examination Female 60+ 0
101537 KERALA 2004 Failure in Examination Male 30-44 0
101538 KERALA 2004 Love Affairs Female 0-14 0
... ... ... ... ... ... ...
232824 KERALA 2004 Service (Government) Male 30-44 39
232825 KERALA 2004 Service (Government) Male 45-59 40
232826 KERALA 2004 Student Male 45-59 0
232827 KERALA 2004 Unemployed Female 30-44 47
232828 KERALA 2004 Divorcee Male 0-100+ 49

566 rows × 6 columns

In [705]:
t_KER_2004 = df_st_KER_2004.loc[:,"Total"]

s4_36 = np.sum(t_KER_2004)
s4_36
Out[705]:
45265
In [706]:
df_st_LD_2004 = df_2004.loc[(df_2004["State"]=="LAKSHADWEEP")]

df_st_LD_2004
Out[706]:
State Year Type Gender Age_group Total
108030 LAKSHADWEEP 2004 Causes Not known Female 60+ 0
108031 LAKSHADWEEP 2004 Causes Not known Male 45-59 0
108032 LAKSHADWEEP 2004 Fall in Social Reputation Female 60+ 0
108033 LAKSHADWEEP 2004 Insanity/Mental Illness Female 15-29 0
108034 LAKSHADWEEP 2004 Paralysis Female 45-59 0
... ... ... ... ... ... ...
233042 LAKSHADWEEP 2004 By touching electric wires Male 45-59 0
233043 LAKSHADWEEP 2004 Professional Activity Male 15-29 0
233044 LAKSHADWEEP 2004 Public Sector Undertaking Male 15-29 0
233045 LAKSHADWEEP 2004 Public Sector Undertaking Male 60+ 0
233046 LAKSHADWEEP 2004 Self-employed (Business activity) Male 15-29 0

556 rows × 6 columns

In [707]:
t_LD_2004 = df_st_LD_2004.loc[:,"Total"]

s4_37 = np.sum(t_LD_2004)
s4_37
Out[707]:
0
In [708]:
df_st_MP_2004 = df_2004.loc[(df_2004["State"]=="MADHYA PRADESH")]

df_st_MP_2004
Out[708]:
State Year Type Gender Age_group Total
114175 MADHYA PRADESH 2004 Divorce Female 60+ 0
114176 MADHYA PRADESH 2004 Drug Abuse/Addiction Female 30-44 0
114177 MADHYA PRADESH 2004 Drug Abuse/Addiction Male 0-14 1
114178 MADHYA PRADESH 2004 Drug Abuse/Addiction Male 45-59 35
114179 MADHYA PRADESH 2004 Family Problems Male 45-59 140
... ... ... ... ... ... ...
233265 MADHYA PRADESH 2004 Physical Abuse (Rape/Incest Etc.) Female 15-29 47
233266 MADHYA PRADESH 2004 Suspected/Illicit Relation Female 45-59 3
233267 MADHYA PRADESH 2004 Others Male 60+ 13
233268 MADHYA PRADESH 2004 Public Sector Undertaking Female 0-14 0
233269 MADHYA PRADESH 2004 Service (Private) Female 60+ 0

566 rows × 6 columns

In [709]:
t_MP_2004 = df_st_MP_2004.loc[:,"Total"]

s4_38 = np.sum(t_MP_2004)
s4_38
Out[709]:
33975
In [710]:
df_st_MH_2004 = df_2004.loc[(df_2004["State"]=="MAHARASHTRA")]

df_st_MH_2004
Out[710]:
State Year Type Gender Age_group Total
119914 MAHARASHTRA 2004 Illegitimate Pregnancy Female 45-59 0
119915 MAHARASHTRA 2004 Love Affairs Male 15-29 94
119916 MAHARASHTRA 2004 Other Prolonged Illness Male 15-29 519
119917 MAHARASHTRA 2004 Unemployment Male 15-29 239
119918 MAHARASHTRA 2004 Unemployment Male 60+ 1
... ... ... ... ... ... ...
233487 MAHARASHTRA 2004 Others Female 60+ 24
233488 MAHARASHTRA 2004 Retired Person Female 0-14 0
233489 MAHARASHTRA 2004 Service (Government) Female 45-59 7
233490 MAHARASHTRA 2004 Student Female 15-29 357
233491 MAHARASHTRA 2004 Student Female 60+ 0

566 rows × 6 columns

In [711]:
t_MH_2004 = df_st_MH_2004.loc[:,"Total"]

s4_39 = np.sum(t_MH_2004)
s4_39
Out[711]:
73645
In [712]:
df_st_MN_2004 = df_2004.loc[(df_2004["State"]=="MANIPUR")]

df_st_MN_2004
Out[712]:
State Year Type Gender Age_group Total
125215 MANIPUR 2004 Bankruptcy or Sudden change in Economic Female 60+ 0
125216 MANIPUR 2004 Cancer Female 0-14 0
125217 MANIPUR 2004 Death of Dear Person Male 0-14 0
125218 MANIPUR 2004 Family Problems Female 45-59 0
125219 MANIPUR 2004 Family Problems Male 30-44 0
... ... ... ... ... ... ...
233709 MANIPUR 2004 House Wife Female 60+ 0
233710 MANIPUR 2004 Others Female 0-14 0
233711 MANIPUR 2004 Others Male 45-59 0
233712 MANIPUR 2004 Service (Government) Female 30-44 0
233713 MANIPUR 2004 Unemployed Male 60+ 0

557 rows × 6 columns

In [713]:
t_MN_2004 = df_st_MN_2004.loc[:,"Total"]

s4_40 = np.sum(t_MN_2004)
s4_40
Out[713]:
204
In [714]:
df_st_MG_2004 = df_2004.loc[(df_2004["State"]=="MEGHALAYA")]

df_st_MG_2004
Out[714]:
State Year Type Gender Age_group Total
130678 MEGHALAYA 2004 Cancellation/Non-Settlement of Marriage Male 15-29 0
130679 MEGHALAYA 2004 Causes Not known Male 45-59 3
130680 MEGHALAYA 2004 Illness (Aids/STD) Female 15-29 0
130681 MEGHALAYA 2004 Illness (Aids/STD) Male 15-29 0
130682 MEGHALAYA 2004 Insanity/Mental Illness Female 60+ 0
... ... ... ... ... ... ...
233913 MEGHALAYA 2004 By Self Infliction of injury Female 45-59 0
233914 MEGHALAYA 2004 House Wife Female 60+ 0
233915 MEGHALAYA 2004 Others Female 0-14 0
233916 MEGHALAYA 2004 Others Male 45-59 0
233917 MEGHALAYA 2004 Service (Government) Female 30-44 0

556 rows × 6 columns

In [715]:
t_MG_2004 = df_st_MG_2004.loc[:,"Total"]

s4_41 = np.sum(t_MG_2004)
s4_41
Out[715]:
275
In [716]:
df_st_MZ_2004 = df_2004.loc[(df_2004["State"]=="MIZORAM")]

df_st_MZ_2004
Out[716]:
State Year Type Gender Age_group Total
135483 MIZORAM 2004 Causes Not known Female 15-29 4
135484 MIZORAM 2004 Death of Dear Person Female 15-29 0
135485 MIZORAM 2004 Dowry Dispute Female 45-59 0
135486 MIZORAM 2004 Failure in Examination Female 60+ 0
135487 MIZORAM 2004 Fall in Social Reputation Female 30-44 0
... ... ... ... ... ... ...
234095 MIZORAM 2004 By Jumping from (Building) Female 45-59 0
234096 MIZORAM 2004 Farming/Agriculture Activity Female 15-29 0
234097 MIZORAM 2004 Service (Private) Female 0-14 0
234098 MIZORAM 2004 Service (Private) Male 45-59 0
234099 MIZORAM 2004 Never Married Male 0-100+ 18

561 rows × 6 columns

In [717]:
t_MN_2004 = df_st_MN_2004.loc[:,"Total"]

s4_42 = np.sum(t_MN_2004)
s4_42
Out[717]:
204
In [718]:
df_st_NG_2004 = df_2004.loc[(df_2004["State"]=="NAGALAND")]

df_st_NG_2004
Out[718]:
State Year Type Gender Age_group Total
142284 NAGALAND 2004 Divorce Female 60+ 0
142285 NAGALAND 2004 Dowry Dispute Male 0-14 0
142286 NAGALAND 2004 Failure in Examination Female 30-44 0
142287 NAGALAND 2004 Illegitimate Pregnancy Female 60+ 0
142288 NAGALAND 2004 Others Female 15-29 0
... ... ... ... ... ... ...
234317 NAGALAND 2004 By Hanging Male 15-29 2
234318 NAGALAND 2004 By Overdose of sleeping pills Female 60+ 0
234319 NAGALAND 2004 By Self Infliction of injury Female 15-29 0
234320 NAGALAND 2004 By Self Infliction of injury Female 60+ 0
234321 NAGALAND 2004 Retired Person Male 60+ 0

561 rows × 6 columns

In [719]:
t_NG_2004 = df_st_NG_2004.loc[:,"Total"]

s4_43 = np.sum(t_NG_2004)
s4_43
Out[719]:
155
In [720]:
df_st_OD_2004 = df_2004.loc[(df_2004["State"]=="ODISHA")]

df_st_OD_2004
Out[720]:
State Year Type Gender Age_group Total
147145 ODISHA 2004 Cancellation/Non-Settlement of Marriage Male 0-14 0
147146 ODISHA 2004 Death of Dear Person Male 15-29 1
147147 ODISHA 2004 Dowry Dispute Female 60+ 0
147148 ODISHA 2004 Illness (Aids/STD) Female 0-14 0
147149 ODISHA 2004 Property Dispute Male 0-14 0
... ... ... ... ... ... ...
234506 ODISHA 2004 Love Affairs Male 0-14 1
234507 ODISHA 2004 Others Female 15-29 113
234508 ODISHA 2004 Others Male 15-29 239
234509 ODISHA 2004 Public Sector Undertaking Male 45-59 24
234510 ODISHA 2004 Unemployed Male 15-29 99

566 rows × 6 columns

In [721]:
t_OD_2004 = df_st_OD_2004.loc[:,"Total"]

s4_44 = np.sum(t_OD_2004)
s4_44
Out[721]:
21075
In [722]:
df_st_PD_2004 = df_2004.loc[(df_2004["State"]=="PUDUCHERRY")]

df_st_PD_2004
Out[722]:
State Year Type Gender Age_group Total
153397 PUDUCHERRY 2004 Cancer Male 30-44 0
153398 PUDUCHERRY 2004 Causes Not known Female 0-14 0
153399 PUDUCHERRY 2004 Drug Abuse/Addiction Male 0-14 0
153400 PUDUCHERRY 2004 By coming under running vehicles/trains Male 30-44 0
153401 PUDUCHERRY 2004 By Fire/Self Immolation Female 15-29 16
... ... ... ... ... ... ...
234733 PUDUCHERRY 2004 Public Sector Undertaking Male 30-44 0
234734 PUDUCHERRY 2004 Self-employed (Business activity) Male 15-29 3
234735 PUDUCHERRY 2004 Service (Government) Male 60+ 0
234736 PUDUCHERRY 2004 Unemployed Female 60+ 5
234737 PUDUCHERRY 2004 Widowed/Widower Male 0-100+ 2

560 rows × 6 columns

In [723]:
t_PD_2004 = df_st_PD_2004.loc[:,"Total"]

s4_45 = np.sum(t_PD_2004)
s4_45
Out[723]:
2694
In [724]:
df_st_PB_2004 = df_2004.loc[(df_2004["State"]=="PUNJAB")]

df_st_PB_2004
Out[724]:
State Year Type Gender Age_group Total
157855 PUNJAB 2004 Bankruptcy or Sudden change in Economic Male 45-59 1
157856 PUNJAB 2004 Fall in Social Reputation Male 45-59 0
157857 PUNJAB 2004 Family Problems Female 0-14 1
157858 PUNJAB 2004 Not having Children(Barrenness/Impotency Male 45-59 0
157859 PUNJAB 2004 Other Prolonged Illness Female 45-59 2
... ... ... ... ... ... ...
234928 PUNJAB 2004 By Drowning Male 45-59 0
234929 PUNJAB 2004 Professional Activity Female 0-14 0
234930 PUNJAB 2004 Public Sector Undertaking Female 0-14 0
234931 PUNJAB 2004 Service (Private) Female 60+ 0
234932 PUNJAB 2004 Unemployed Female 30-44 4

564 rows × 6 columns

In [725]:
t_PB_2004 = df_st_PB_2004.loc[:,"Total"]

s4_46 = np.sum(t_PB_2004)
s4_46
Out[725]:
3225
In [726]:
df_st_RJ_2004 = df_2004.loc[(df_2004["State"]=="RAJASTHAN")]

df_st_RJ_2004
Out[726]:
State Year Type Gender Age_group Total
164615 RAJASTHAN 2004 Bankruptcy or Sudden change in Economic Male 0-14 0
164616 RAJASTHAN 2004 Bankruptcy or Sudden change in Economic Male 30-44 30
164617 RAJASTHAN 2004 Death of Dear Person Male 0-14 0
164618 RAJASTHAN 2004 Death of Dear Person Male 15-29 0
164619 RAJASTHAN 2004 Dowry Dispute Female 30-44 10
... ... ... ... ... ... ...
235133 RAJASTHAN 2004 By Fire/Self Immolation Female 45-59 33
235134 RAJASTHAN 2004 By Jumping off Moving Vehicles/Trains Female 30-44 4
235135 RAJASTHAN 2004 Farming/Agriculture Activity Male 15-29 207
235136 RAJASTHAN 2004 Others Male 15-29 162
235137 RAJASTHAN 2004 Others Male 15-29 171

566 rows × 6 columns

In [727]:
t_RJ_2004 = df_st_RJ_2004.loc[:,"Total"]

s4_47 = np.sum(t_RJ_2004)
s4_47
Out[727]:
18625
In [728]:
df_st_SM_2004 = df_2004.loc[(df_2004["State"]=="SIKKIM")]

df_st_SM_2004
Out[728]:
State Year Type Gender Age_group Total
169262 SIKKIM 2004 Bankruptcy or Sudden change in Economic Female 45-59 0
169263 SIKKIM 2004 Death of Dear Person Male 45-59 0
169264 SIKKIM 2004 Failure in Examination Female 0-14 0
169265 SIKKIM 2004 Fall in Social Reputation Female 60+ 0
169266 SIKKIM 2004 Love Affairs Female 0-14 0
... ... ... ... ... ... ...
235351 SIKKIM 2004 By Over Alcoholism Male 30-44 0
235352 SIKKIM 2004 House Wife Female 45-59 7
235353 SIKKIM 2004 Student Female 30-44 0
235354 SIKKIM 2004 Student Female 60+ 0
235355 SIKKIM 2004 Widowed/Widower Male 0-100+ 0

560 rows × 6 columns

In [729]:
t_SM_2004 = df_st_SM_2004.loc[:,"Total"]

s4_48 = np.sum(t_SM_2004)
s4_48
Out[729]:
488
In [730]:
df_st_TN_2004 = df_2004.loc[(df_2004["State"]=="TAMIL NADU")]

df_st_TN_2004
Out[730]:
State Year Type Gender Age_group Total
175041 TAMIL NADU 2004 Dowry Dispute Female 30-44 38
175042 TAMIL NADU 2004 Family Problems Male 0-14 19
175043 TAMIL NADU 2004 Insanity/Mental Illness Female 45-59 50
175044 TAMIL NADU 2004 Others Female 45-59 84
175045 TAMIL NADU 2004 Others Male 0-14 54
... ... ... ... ... ... ...
235581 TAMIL NADU 2004 Professional Activity Male 30-44 102
235582 TAMIL NADU 2004 Retired Person Female 30-44 0
235583 TAMIL NADU 2004 Student Female 15-29 163
235584 TAMIL NADU 2004 Unemployed Female 45-59 93
235585 TAMIL NADU 2004 Married Male 0-100+ 5583

566 rows × 6 columns

In [731]:
t_TN_2004 = df_st_TN_2004.loc[:,"Total"]

s4_49 = np.sum(t_TN_2004)
s4_49
Out[731]:
64195
In [732]:
df_st_TP_2004 = df_2004.loc[(df_2004["State"]=="TRIPURA")]

df_st_TP_2004
Out[732]:
State Year Type Gender Age_group Total
181249 TRIPURA 2004 Bankruptcy or Sudden change in Economic Female 45-59 1
181250 TRIPURA 2004 Dowry Dispute Female 60+ 0
181251 TRIPURA 2004 Failure in Examination Female 15-29 4
181252 TRIPURA 2004 Ideological Causes/Hero Worshipping Female 60+ 0
181253 TRIPURA 2004 Ideological Causes/Hero Worshipping Male 60+ 0
... ... ... ... ... ... ...
235800 TRIPURA 2004 By Jumping from (Building) Female 15-29 0
235801 TRIPURA 2004 By Jumping off Moving Vehicles/Trains Male 15-29 0
235802 TRIPURA 2004 By Over Alcoholism Male 30-44 1
235803 TRIPURA 2004 By touching electric wires Female 15-29 2
235804 TRIPURA 2004 Service (Government) Male 0-14 0

565 rows × 6 columns

In [733]:
t_TP_2004 = df_st_TP_2004.loc[:,"Total"]

s4_50 = np.sum(t_TP_2004)
s4_50
Out[733]:
3850
In [734]:
df_st_UP_2004 = df_2004.loc[(df_2004["State"]=="UTTAR PRADESH")]

df_st_UP_2004
Out[734]:
State Year Type Gender Age_group Total
185583 UTTAR PRADESH 2004 Drug Abuse/Addiction Female 15-29 0
185584 UTTAR PRADESH 2004 Not having Children(Barrenness/Impotency Female 30-44 17
185585 UTTAR PRADESH 2004 Not having Children(Barrenness/Impotency Female 60+ 0
185586 UTTAR PRADESH 2004 Others Female 15-29 100
185587 UTTAR PRADESH 2004 Others Male 0-14 6
... ... ... ... ... ... ...
235978 UTTAR PRADESH 2004 Others Female 15-29 5
235979 UTTAR PRADESH 2004 Professional Activity Female 30-44 5
235980 UTTAR PRADESH 2004 Self-employed (Business activity) Male 30-44 54
235981 UTTAR PRADESH 2004 Service (Government) Female 45-59 0
235982 UTTAR PRADESH 2004 Student Male 30-44 8

566 rows × 6 columns

In [735]:
t_UP_2004 = df_st_UP_2004.loc[:,"Total"]

s4_51 = np.sum(t_UP_2004)
s4_51
Out[735]:
18185
In [736]:
df_st_UK_2004 = df_2004.loc[(df_2004["State"]=="UTTARAKHAND")]

df_st_UK_2004
Out[736]:
State Year Type Gender Age_group Total
189983 UTTARAKHAND 2004 Dowry Dispute Male 60+ 0
189984 UTTARAKHAND 2004 Drug Abuse/Addiction Male 45-59 0
189985 UTTARAKHAND 2004 Illness (Aids/STD) Male 0-14 0
189986 UTTARAKHAND 2004 Not having Children(Barrenness/Impotency Male 45-59 0
189987 UTTARAKHAND 2004 Other Prolonged Illness Female 30-44 1
... ... ... ... ... ... ...
236203 UTTARAKHAND 2004 By touching electric wires Female 45-59 0
236204 UTTARAKHAND 2004 House Wife Male 0-14 0
236205 UTTARAKHAND 2004 Professional Activity Female 15-29 0
236206 UTTARAKHAND 2004 Public Sector Undertaking Female 15-29 0
236207 UTTARAKHAND 2004 Public Sector Undertaking Female 60+ 0

565 rows × 6 columns

In [737]:
t_UK_2004 = df_st_UK_2004.loc[:,"Total"]

s4_52 = np.sum(t_UK_2004)
s4_52
Out[737]:
1185
In [738]:
df_st_WB_2004 = df_2004.loc[(df_2004["State"]=="WEST BENGAL")]

df_st_WB_2004
Out[738]:
State Year Type Gender Age_group Total
196837 WEST BENGAL 2004 Death of Dear Person Male 45-59 10
196838 WEST BENGAL 2004 Divorce Female 15-29 32
196839 WEST BENGAL 2004 Failure in Examination Female 60+ 0
196840 WEST BENGAL 2004 Failure in Examination Male 30-44 15
196841 WEST BENGAL 2004 Love Affairs Female 60+ 0
... ... ... ... ... ... ...
236437 WEST BENGAL 2004 By touching electric wires Male 45-59 5
236438 WEST BENGAL 2004 Others Female 15-29 284
236439 WEST BENGAL 2004 Retired Person Female 30-44 0
236440 WEST BENGAL 2004 Service (Private) Female 0-14 0
236441 WEST BENGAL 2004 Seperated Female 0-100+ 250

565 rows × 6 columns

In [739]:
t_WB_2004 = df_st_WB_2004.loc[:,"Total"]

s4_53 = np.sum(t_WB_2004)
s4_53
Out[739]:
67035
In [740]:
t_ANm_2004 = np.sum(df_st_AN_2004.where(df_st_AN_2004["Gender"]=="Male")["Total"])
t_ANm_2004
Out[740]:
405.0
In [741]:
t_ANfm_2004 = np.sum(df_st_AN_2004.where(df_st_AN_2004["Gender"]=="Female")["Total"])
t_ANfm_2004
Out[741]:
205.0
In [742]:
t_APm_2004 = np.sum(df_st_AP_2004.where(df_st_AP_2004["Gender"]=="Male")["Total"])
t_APm_2004
Out[742]:
45410.0
In [743]:
t_APfm_2004 = np.sum(df_st_AP_2004.where(df_st_AP_2004["Gender"]=="Female")["Total"])
t_APfm_2004
Out[743]:
22220.0
In [744]:
t_ARPm_2004 = np.sum(df_st_ARP_2004.where(df_st_ARP_2004["Gender"]=="Male")["Total"])
t_ARPm_2004
Out[744]:
245.0
In [745]:
t_ARPfm_2004 = np.sum(df_st_ARP_2004.where(df_st_ARP_2004["Gender"]=="Female")["Total"])
t_ARPfm_2004
Out[745]:
150.0
In [746]:
t_ASm_2004 = np.sum(df_st_AS_2004.where(df_st_AS_2004["Gender"]=="Male")["Total"])
t_ASm_2004
Out[746]:
9725.0
In [747]:
t_ASfm_2004 = np.sum(df_st_AS_2004.where(df_st_AS_2004["Gender"]=="Female")["Total"])
t_ASfm_2004
Out[747]:
4453.0
In [748]:
t_BHm_2004 = np.sum(df_st_BH_2004.where(df_st_BH_2004["Gender"]=="Male")["Total"])
t_BHm_2004
Out[748]:
1060.0
In [749]:
t_BHfm_2004 = np.sum(df_st_BH_2004.where(df_st_BH_2004["Gender"]=="Female")["Total"])
t_BHfm_2004
Out[749]:
695.0
In [750]:
t_CHm_2004 = np.sum(df_st_CH_2004.where(df_st_CH_2004["Gender"]=="Male")["Total"])
t_CHm_2004
Out[750]:
260.0
In [751]:
t_CHfm_2004 = np.sum(df_st_CH_2004.where(df_st_CH_2004["Gender"]=="Female")["Total"])
t_CHfm_2004
Out[751]:
115.0
In [752]:
t_CTm_2004 = np.sum(df_st_CT_2004.where(df_st_CT_2004["Gender"]=="Male")["Total"])
t_CTm_2004
Out[752]:
14930.0
In [753]:
t_CTfm_2004 = np.sum(df_st_CT_2004.where(df_st_CT_2004["Gender"]=="Female")["Total"])
t_CTfm_2004
Out[753]:
7545.0
In [754]:
t_DNm_2004 = np.sum(df_st_DN_2004.where(df_st_DN_2004["Gender"]=="Male")["Total"])
t_DNm_2004
Out[754]:
100.0
In [755]:
t_DNfm_2004 = np.sum(df_st_DN_2004.where(df_st_DN_2004["Gender"]=="Female")["Total"])
t_DNfm_2004
Out[755]:
95.0
In [756]:
t_DDm_2004 = np.sum(df_st_DD_2004.where(df_st_DD_2004["Gender"]=="Male")["Total"])
t_DDm_2004
Out[756]:
25.0
In [757]:
t_DDfm_2004 = np.sum(df_st_DD_2004.where(df_st_DD_2004["Gender"]=="Female")["Total"])
t_DDfm_2004
Out[757]:
40.0
In [758]:
t_DLm_2004 = np.sum(df_st_DL_2004.where(df_st_DL_2004["Gender"]=="Male")["Total"])
t_DLm_2004
Out[758]:
3994.0
In [759]:
t_DLfm_2004 = np.sum(df_st_DL_2004.where(df_st_DL_2004["Gender"]=="Female")["Total"])
t_DLfm_2004
Out[759]:
2283.0
In [760]:
t_GOAm_2004 = np.sum(df_st_GOA_2004.where(df_st_GOA_2004["Gender"]=="Male")["Total"])
t_GOAm_2004
Out[760]:
1060.0
In [761]:
t_GOAfm_2004 = np.sum(df_st_GOA_2004.where(df_st_GOA_2004["Gender"]=="Female")["Total"])
t_GOAfm_2004
Out[761]:
510.0
In [762]:
t_GJm_2004 = np.sum(df_st_GJ_2004.where(df_st_GJ_2004["Gender"]=="Male")["Total"])
t_GJm_2004
Out[762]:
14250.0
In [763]:
t_GJfm_2004 = np.sum(df_st_GJ_2004.where(df_st_GJ_2004["Gender"]=="Female")["Total"])
t_GJfm_2004
Out[763]:
9618.0
In [764]:
t_HRm_2004 = np.sum(df_st_HR_2004.where(df_st_HR_2004["Gender"]=="Male")["Total"])
t_HRm_2004
Out[764]:
7270.0
In [765]:
t_HRfm_2004 = np.sum(df_st_HR_2004.where(df_st_HR_2004["Gender"]=="Female")["Total"])
t_HRfm_2004
Out[765]:
3140.0
In [766]:
t_HPm_2004 = np.sum(df_st_HP_2004.where(df_st_HP_2004["Gender"]=="Male")["Total"])
t_HPm_2004
Out[766]:
1165.0
In [767]:
t_HPfm_2004 = np.sum(df_st_HP_2004.where(df_st_HP_2004["Gender"]=="Female")["Total"])
t_HPfm_2004
Out[767]:
675.0
In [768]:
t_JKm_2004 = np.sum(df_st_JK_2004.where(df_st_JK_2004["Gender"]=="Male")["Total"])
t_JKm_2004
Out[768]:
255.0
In [769]:
t_JKfm_2004 = np.sum(df_st_JK_2004.where(df_st_JK_2004["Gender"]=="Female")["Total"])
t_JKfm_2004
Out[769]:
305.0
In [770]:
t_JHm_2004 = np.sum(df_st_JH_2004.where(df_st_JH_2004["Gender"]=="Male")["Total"])
t_JHm_2004
Out[770]:
1165.0
In [771]:
t_JHfm_2004 = np.sum(df_st_JH_2004.where(df_st_JH_2004["Gender"]=="Female")["Total"])
t_JHfm_2004
Out[771]:
920.0
In [772]:
t_KNm_2004 = np.sum(df_st_KN_2004.where(df_st_KN_2004["Gender"]=="Male")["Total"])
t_KNm_2004
Out[772]:
40090.0
In [773]:
t_KNfm_2004 = np.sum(df_st_KN_2004.where(df_st_KN_2004["Gender"]=="Female")["Total"])
t_KNfm_2004
Out[773]:
19595.0
In [774]:
t_KERm_2004 = np.sum(df_st_KER_2004.where(df_st_KER_2004["Gender"]=="Male")["Total"])
t_KERm_2004
Out[774]:
32990.0
In [775]:
t_KERfm_2004 = np.sum(df_st_KER_2004.where(df_st_KER_2004["Gender"]=="Female")["Total"])
t_KERfm_2004
Out[775]:
12275.0
In [776]:
t_LDm_2004 = np.sum(df_st_LD_2004.where(df_st_LD_2004["Gender"]=="Male")["Total"])
t_LDm_2004
Out[776]:
0.0
In [777]:
t_LDfm_2004 = np.sum(df_st_LD_2004.where(df_st_LD_2004["Gender"]=="Female")["Total"])
t_LDfm_2004
Out[777]:
0.0
In [778]:
t_MPm_2004 = np.sum(df_st_MP_2004.where(df_st_MP_2004["Gender"]=="Male")["Total"])
t_MPm_2004
Out[778]:
18170.0
In [779]:
t_MPfm_2004 = np.sum(df_st_MP_2004.where(df_st_MP_2004["Gender"]=="Female")["Total"])
t_MPfm_2004
Out[779]:
15805.0
In [780]:
t_MHm_2004 = np.sum(df_st_MH_2004.where(df_st_MH_2004["Gender"]=="Male")["Total"])
t_MHm_2004
Out[780]:
49515.0
In [781]:
t_MHfm_2004 = np.sum(df_st_MH_2004.where(df_st_MH_2004["Gender"]=="Female")["Total"])
t_MHfm_2004
Out[781]:
24130.0
In [782]:
t_MNm_2004 = np.sum(df_st_MN_2004.where(df_st_MN_2004["Gender"]=="Male")["Total"])
t_MNm_2004
Out[782]:
159.0
In [783]:
t_MNfm_2004 = np.sum(df_st_MN_2004.where(df_st_MN_2004["Gender"]=="Female")["Total"])
t_MNfm_2004
Out[783]:
45.0
In [784]:
t_MGm_2004 = np.sum(df_st_MG_2004.where(df_st_MG_2004["Gender"]=="Male")["Total"])
t_MGm_2004
Out[784]:
195.0
In [785]:
t_MGfm_2004 = np.sum(df_st_MG_2004.where(df_st_MG_2004["Gender"]=="Female")["Total"])
t_MGfm_2004
Out[785]:
80.0
In [786]:
t_MZm_2004 = np.sum(df_st_MZ_2004.where(df_st_MZ_2004["Gender"]=="Male")["Total"])
t_MZm_2004
Out[786]:
265.0
In [787]:
t_MZfm_2004 = np.sum(df_st_MZ_2004.where(df_st_MZ_2004["Gender"]=="Female")["Total"])
t_MZfm_2004
Out[787]:
35.0
In [788]:
t_NGm_2004 = np.sum(df_st_NG_2004.where(df_st_NG_2004["Gender"]=="Male")["Total"])
t_NGm_2004
Out[788]:
125.0
In [789]:
t_NGfm_2004 = np.sum(df_st_NG_2004.where(df_st_NG_2004["Gender"]=="Female")["Total"])
t_MGfm_2004
Out[789]:
80.0
In [790]:
t_ODm_2004 = np.sum(df_st_OD_2004.where(df_st_OD_2004["Gender"]=="Male")["Total"])
t_ODm_2004
Out[790]:
12720.0
In [791]:
t_ODfm_2004 = np.sum(df_st_OD_2004.where(df_st_OD_2004["Gender"]=="Female")["Total"])
t_ODfm_2004
Out[791]:
8355.0
In [792]:
t_PDm_2004 = np.sum(df_st_PD_2004.where(df_st_PD_2004["Gender"]=="Male")["Total"])
t_PDm_2004
Out[792]:
1690.0
In [793]:
t_PDfm_2004 = np.sum(df_st_PD_2004.where(df_st_PD_2004["Gender"]=="Female")["Total"])
t_PDfm_2004
Out[793]:
1004.0
In [794]:
t_PBm_2004 = np.sum(df_st_PB_2004.where(df_st_PB_2004["Gender"]=="Male")["Total"])
t_PBm_2004
Out[794]:
2580.0
In [795]:
t_PBfm_2004 = np.sum(df_st_PB_2004.where(df_st_PB_2004["Gender"]=="Female")["Total"])
t_PBfm_2004
Out[795]:
645.0
In [796]:
t_RJm_2004 = np.sum(df_st_RJ_2004.where(df_st_RJ_2004["Gender"]=="Male")["Total"])
t_RJm_2004
Out[796]:
12430.0
In [797]:
t_RJfm_2004 = np.sum(df_st_RJ_2004.where(df_st_RJ_2004["Gender"]=="Female")["Total"])
t_RJfm_2004
Out[797]:
6195.0
In [798]:
t_SMm_2004 = np.sum(df_st_SM_2004.where(df_st_SM_2004["Gender"]=="Male")["Total"])
t_SMm_2004
Out[798]:
278.0
In [799]:
t_SMfm_2004 = np.sum(df_st_SM_2004.where(df_st_SM_2004["Gender"]=="Female")["Total"])
t_SMfm_2004
Out[799]:
210.0
In [800]:
t_TNm_2004 = np.sum(df_st_TN_2004.where(df_st_TN_2004["Gender"]=="Male")["Total"])
t_TNm_2004
Out[800]:
39730.0
In [801]:
t_TNfm_2004 = np.sum(df_st_TN_2004.where(df_st_TN_2004["Gender"]=="Female")["Total"])
t_TNfm_2004
Out[801]:
24465.0
In [802]:
t_TPm_2004 = np.sum(df_st_TP_2004.where(df_st_TP_2004["Gender"]=="Male")["Total"])
t_TPm_2004
Out[802]:
2165.0
In [803]:
t_TPfm_2004 = np.sum(df_st_TP_2004.where(df_st_TP_2004["Gender"]=="Female")["Total"])
t_TPfm_2004
Out[803]:
1685.0
In [804]:
t_UPm_2004 = np.sum(df_st_UP_2004.where(df_st_UP_2004["Gender"]=="Male")["Total"])
t_UPm_2004
Out[804]:
9770.0
In [805]:
t_UPfm_2004 = np.sum(df_st_UP_2004.where(df_st_UP_2004["Gender"]=="Female")["Total"])
t_UPfm_2004
Out[805]:
8415.0
In [806]:
t_UKm_2004 = np.sum(df_st_UK_2004.where(df_st_UK_2004["Gender"]=="Male")["Total"])
t_UKm_2004
Out[806]:
740.0
In [807]:
t_UKfm_2004 = np.sum(df_st_UK_2004.where(df_st_UK_2004["Gender"]=="Female")["Total"])
t_UKfm_2004
Out[807]:
445.0
In [808]:
t_WBm_2004 = np.sum(df_st_WB_2004.where(df_st_WB_2004["Gender"]=="Male")["Total"])
t_WBm_2004
Out[808]:
38305.0
In [809]:
t_WBfm_2004 = np.sum(df_st_WB_2004.where(df_st_WB_2004["Gender"]=="Female")["Total"])
t_WBfm_2004
Out[809]:
28730.0
In [810]:
l_2004=list(df_2004.loc[:,"Type"].unique())
l_2004.sort()
print(l_2004,end=" ")
['Bankruptcy or Sudden change in Economic', 'By Consuming Insecticides', 'By Consuming Other Poison', 'By Drowning', 'By Fire-Arms', 'By Fire/Self Immolation', 'By Hanging', 'By Jumping from (Building)', 'By Jumping from (Other sites)', 'By Jumping off Moving Vehicles/Trains', 'By Machine', 'By Over Alcoholism', 'By Overdose of sleeping pills', 'By Self Infliction of injury', 'By coming under running vehicles/trains', 'By touching electric wires', 'Cancellation/Non-Settlement of Marriage', 'Cancer', 'Causes Not known', 'Death of Dear Person', 'Diploma', 'Divorce', 'Divorcee', 'Dowry Dispute', 'Drug Abuse/Addiction', 'Failure in Examination', 'Fall in Social Reputation', 'Family Problems', 'Farming/Agriculture Activity', 'Graduate', 'House Wife', 'Hr. Secondary/Intermediate/Pre-Universit', 'Ideological Causes/Hero Worshipping', 'Illegitimate Pregnancy', 'Illness (Aids/STD)', 'Insanity/Mental Illness', 'Love Affairs', 'Married', 'Matriculate/Secondary', 'Middle', 'Never Married', 'No Education', 'Not having Children(Barrenness/Impotency', 'Other Prolonged Illness', 'Others', 'Paralysis', 'Physical Abuse (Rape/Incest Etc.)', 'Post Graduate and Above', 'Poverty', 'Primary', 'Professional Activity', 'Professional/Career Problem', 'Property Dispute', 'Public Sector Undertaking', 'Retired Person', 'Self-employed (Business activity)', 'Seperated', 'Service (Government)', 'Service (Private)', 'Student', 'Suspected/Illicit Relation', 'Unemployed', 'Unemployment', 'Widowed/Widower'] 
In [811]:
cause_l_2004=[]
for i in l_2004:
    rough= np.sum(df_2004.where(df_2004["Type"]==i)["Total"])
    cause_l_2004.append(rough)

print(cause_l_2004,end=" ")
[3063.0, 23311.0, 19017.0, 7201.0, 503.0, 8697.0, 35499.0, 401.0, 612.0, 619.0, 105.0, 1070.0, 1021.0, 308.0, 3102.0, 1047.0, 762.0, 822.0, 18812.0, 749.0, 842.0, 367.0, 1197.0, 2638.0, 1927.0, 2496.0, 710.0, 25531.0, 18241.0, 2018.0, 23170.0, 8646.0, 81.0, 204.0, 668.0, 7117.0, 3799.0, 79668.0, 19260.0, 26723.0, 24592.0, 26916.0, 694.0, 16341.0, 63214.0, 504.0, 306.0, 629.0, 3403.0, 28663.0, 2689.0, 1032.0, 1689.0, 2188.0, 939.0, 5777.0, 3500.0, 1874.0, 7700.0, 5610.0, 1216.0, 9538.0, 2571.0, 4740.0] 
In [812]:
x1_2004 = set(df_2004.loc[:,"State"])
x1_2004
len(x1_2004)
Out[812]:
35
In [813]:
cause_df_2004 = pd.DataFrame(cause_l_2004,l_2004)
cause_df_2004.reset_index()
Out[813]:
index 0
0 Bankruptcy or Sudden change in Economic 3063.0
1 By Consuming Insecticides 23311.0
2 By Consuming Other Poison 19017.0
3 By Drowning 7201.0
4 By Fire-Arms 503.0
... ... ...
59 Student 5610.0
60 Suspected/Illicit Relation 1216.0
61 Unemployed 9538.0
62 Unemployment 2571.0
63 Widowed/Widower 4740.0

64 rows × 2 columns

In [814]:
cause_df_2004.plot.bar(stacked=True,figsize=(50,20))
plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("Causes",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths due to Different Causes in 2004",fontsize=55)
plt.legend(["Death Count"], prop={"size":30})
Out[814]:
<matplotlib.legend.Legend at 0x1108628>
In [815]:
s_2004=list(df_2004.loc[:,"State"].unique())
s_2004.sort()
print(s_2004,end=" ")
['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH', 'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR', 'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA', 'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA', 'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'] 
In [816]:
state_s_2004 = [s4_19,s4_20,s4_21,s4_22,s4_23,s4_24,s4_25,s4_26,s4_27,s4_28,s4_29,s4_30,s4_31,s4_32,s4_33,s4_34,
           s4_35,s4_36,s4_37,s4_38,s4_39,s4_40,s4_41,s4_42,s4_43,s4_44,s4_45,s4_46,s4_47,s4_48,s4_49,s4_50,
           s4_51,s4_52,s4_53]
print(state_s_2004,end=" ")
[610, 67630, 395, 14178, 1755, 375, 22475, 195, 65, 6277, 1570, 23868, 10410, 1840, 560, 2085, 59685, 45265, 0, 33975, 73645, 204, 275, 204, 155, 21075, 2694, 3225, 18625, 488, 64195, 3850, 18185, 1185, 67035] 
In [817]:
state_m_2004=[t_ANm_2004, t_APm_2004, t_ARPm_2004, t_ASm_2004, t_BHm_2004, t_CHm_2004, t_CTm_2004, t_DNm_2004,
             t_DDm_2004, t_DLm_2004, t_GOAm_2004, t_GJm_2004, t_HRm_2004, t_HPm_2004,t_JKm_2004, t_JHm_2004,
             t_KNm_2004, t_KERm_2004, t_LDm_2004,t_MPm_2004,t_MHm_2004,t_MNm_2004,t_MGm_2004,t_MZm_2004,
             t_NGm_2004, t_ODm_2004, t_PDm_2004,t_PBm_2004,t_RJm_2004,t_SMm_2004,t_TNm_2004,t_TPm_2004,
             t_UPm_2004, t_UKm_2004, t_WBm_2004]
print(state_m_2004,end=" ")
[405.0, 45410.0, 245.0, 9725.0, 1060.0, 260.0, 14930.0, 100.0, 25.0, 3994.0, 1060.0, 14250.0, 7270.0, 1165.0, 255.0, 1165.0, 40090.0, 32990.0, 0.0, 18170.0, 49515.0, 159.0, 195.0, 265.0, 125.0, 12720.0, 1690.0, 2580.0, 12430.0, 278.0, 39730.0, 2165.0, 9770.0, 740.0, 38305.0] 
In [818]:
state_fm_2004=[t_ANfm_2004, t_APfm_2004, t_ARPfm_2004, t_ASfm_2004, t_BHfm_2004, t_CHfm_2004, t_CTfm_2004, t_DNfm_2004,
             t_DDfm_2004, t_DLfm_2004, t_GOAfm_2004, t_GJfm_2004, t_HRfm_2004, t_HPfm_2004,t_JKfm_2004, t_JHfm_2004,
             t_KNfm_2004, t_KERfm_2004, t_LDfm_2004,t_MPfm_2004,t_MHfm_2004,t_MNfm_2004,t_MGfm_2004,t_MZfm_2004,
             t_NGfm_2004, t_ODfm_2004, t_PDfm_2004,t_PBfm_2004,t_RJfm_2004,t_SMfm_2004,t_TNfm_2004,t_TPfm_2004,
             t_UPfm_2004, t_UKfm_2004, t_WBfm_2004]
print(state_fm_2004,end=" ")
[205.0, 22220.0, 150.0, 4453.0, 695.0, 115.0, 7545.0, 95.0, 40.0, 2283.0, 510.0, 9618.0, 3140.0, 675.0, 305.0, 920.0, 19595.0, 12275.0, 0.0, 15805.0, 24130.0, 45.0, 80.0, 35.0, 30.0, 8355.0, 1004.0, 645.0, 6195.0, 210.0, 24465.0, 1685.0, 8415.0, 445.0, 28730.0] 
In [819]:
df_state_2004 = {
    
    "State":['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH',
             'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR',
             'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA',
             'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA',
             'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'],
                   
    "Total":[s4_19,s4_20,s4_21,s4_22,s4_23,s4_24,s4_25,s4_26,s4_27,s4_28,s4_29,s4_30,s4_31,s4_32,s4_33,s4_34,
           s4_35,s4_36,s4_37,s4_38,s4_39,s4_40,s4_41,s4_42,s4_43,s4_44,s4_45,s4_46,s4_47,s4_48,s4_49,s4_50,
           s4_51,s4_52,s4_53],
       
    "Male":[t_ANm_2004, t_APm_2004, t_ARPm_2004, t_ASm_2004, t_BHm_2004, t_CHm_2004, t_CTm_2004, t_DNm_2004,
             t_DDm_2004, t_DLm_2004, t_GOAm_2004, t_GJm_2004, t_HRm_2004, t_HPm_2004,t_JKm_2004, t_JHm_2004,
             t_KNm_2004, t_KERm_2004, t_LDm_2004,t_MPm_2004,t_MHm_2004,t_MNm_2004,t_MGm_2004,t_MZm_2004,
             t_NGm_2004, t_ODm_2004, t_PDm_2004,t_PBm_2004,t_RJm_2004,t_SMm_2004,t_TNm_2004,t_TPm_2004,
             t_UPm_2004, t_UKm_2004, t_WBm_2004],
                 
    "Female":[t_ANfm_2004, t_APfm_2004, t_ARPfm_2004, t_ASfm_2004, t_BHfm_2004, t_CHfm_2004, t_CTfm_2004, t_DNfm_2004,
             t_DDfm_2004, t_DLfm_2004, t_GOAfm_2004, t_GJfm_2004, t_HRfm_2004, t_HPfm_2004,t_JKfm_2004, t_JHfm_2004,
             t_KNfm_2004, t_KERfm_2004, t_LDfm_2004,t_MPfm_2004,t_MHfm_2004,t_MNfm_2004,t_MGfm_2004,t_MZfm_2004,
             t_NGfm_2004, t_ODfm_2004, t_PDfm_2004,t_PBfm_2004,t_RJfm_2004,t_SMfm_2004,t_TNfm_2004,t_TPfm_2004,
             t_UPfm_2004, t_UKfm_2004, t_WBfm_2004]
                  

}

df_All_st_2004 = pd.DataFrame(df_state_2004)
df_All_st_2004
Out[819]:
State Total Male Female
0 A & N ISLANDS 610 405.0 205.0
1 ANDHRA PRADESH 67630 45410.0 22220.0
2 ARUNACHAL PRADESH 395 245.0 150.0
3 ASSAM 14178 9725.0 4453.0
4 BIHAR 1755 1060.0 695.0
5 CHANDIGARH 375 260.0 115.0
6 CHHATTISGARH 22475 14930.0 7545.0
7 D & N HAVELI 195 100.0 95.0
8 DAMAN & DIU 65 25.0 40.0
9 DELHI (UT) 6277 3994.0 2283.0
10 GOA 1570 1060.0 510.0
11 GUJARAT 23868 14250.0 9618.0
12 HARYANA 10410 7270.0 3140.0
13 HIMACHAL PRADESH 1840 1165.0 675.0
14 JAMMU & KASHMIR 560 255.0 305.0
15 JHARKHAND 2085 1165.0 920.0
16 KARNATAKA 59685 40090.0 19595.0
17 KERALA 45265 32990.0 12275.0
18 LAKSHADWEEP 0 0.0 0.0
19 MADHYA PRADESH 33975 18170.0 15805.0
20 MAHARASHTRA 73645 49515.0 24130.0
21 MANIPUR 204 159.0 45.0
22 MEGHALAYA 275 195.0 80.0
23 MIZORAM 204 265.0 35.0
24 NAGALAND 155 125.0 30.0
25 ODISHA 21075 12720.0 8355.0
26 PUDUCHERRY 2694 1690.0 1004.0
27 PUNJAB 3225 2580.0 645.0
28 RAJASTHAN 18625 12430.0 6195.0
29 SIKKIM 488 278.0 210.0
30 TAMIL NADU 64195 39730.0 24465.0
31 TRIPURA 3850 2165.0 1685.0
32 UTTAR PRADESH 18185 9770.0 8415.0
33 UTTARAKHAND 1185 740.0 445.0
34 WEST BENGAL 67035 38305.0 28730.0
In [820]:
pivot_2004 = pd.pivot_table(df_All_st_2004, values=None, index='State', columns=None,
                       fill_value=None, margins=False, dropna=True, margins_name='All', observed=False)

pivot_2004
Out[820]:
Female Male Total
State
A & N ISLANDS 205.0 405.0 610
ANDHRA PRADESH 22220.0 45410.0 67630
ARUNACHAL PRADESH 150.0 245.0 395
ASSAM 4453.0 9725.0 14178
BIHAR 695.0 1060.0 1755
CHANDIGARH 115.0 260.0 375
CHHATTISGARH 7545.0 14930.0 22475
D & N HAVELI 95.0 100.0 195
DAMAN & DIU 40.0 25.0 65
DELHI (UT) 2283.0 3994.0 6277
GOA 510.0 1060.0 1570
GUJARAT 9618.0 14250.0 23868
HARYANA 3140.0 7270.0 10410
HIMACHAL PRADESH 675.0 1165.0 1840
JAMMU & KASHMIR 305.0 255.0 560
JHARKHAND 920.0 1165.0 2085
KARNATAKA 19595.0 40090.0 59685
KERALA 12275.0 32990.0 45265
LAKSHADWEEP 0.0 0.0 0
MADHYA PRADESH 15805.0 18170.0 33975
MAHARASHTRA 24130.0 49515.0 73645
MANIPUR 45.0 159.0 204
MEGHALAYA 80.0 195.0 275
MIZORAM 35.0 265.0 204
NAGALAND 30.0 125.0 155
ODISHA 8355.0 12720.0 21075
PUDUCHERRY 1004.0 1690.0 2694
PUNJAB 645.0 2580.0 3225
RAJASTHAN 6195.0 12430.0 18625
SIKKIM 210.0 278.0 488
TAMIL NADU 24465.0 39730.0 64195
TRIPURA 1685.0 2165.0 3850
UTTAR PRADESH 8415.0 9770.0 18185
UTTARAKHAND 445.0 740.0 1185
WEST BENGAL 28730.0 38305.0 67035
In [821]:
pivot_2004.plot(kind='bar',figsize=(60,30))

plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("States",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths of Males And Females In Different State",fontsize=55)
plt.legend(["Female","Male","Total"], prop={"size":30})

plt.show
Out[821]:
<function matplotlib.pyplot.show(close=None, block=None)>
In [822]:
cause_l_percent_2004=[]
for i in cause_l_2004:
    p=i/np.sum(cause_l_2004)
    avg_2004_cause=p*100
    cause_l_percent_2004.append(avg_2004_cause)

print(cause_l_percent_2004,end=" ")
[0.5389294254058685, 4.101529166058179, 3.3460074707618035, 1.2670031969793207, 0.08850195918352984, 1.530221747553, 6.245986181026095, 0.07055523982623352, 0.10768031614377786, 0.10891195374672956, 0.01847456404427561, 0.18826460502261816, 0.1796431418019562, 0.05419205452987513, 0.5457914063365995, 0.18421779575577682, 0.13407255049274303, 0.14462944423232907, 3.3099380838182175, 0.13178522351583272, 0.1481484088121911, 0.06457300004046809, 0.21061003010474197, 0.4641514280838006, 0.3390522372697058, 0.43916677956678024, 0.12492324258510175, 4.492134234422863, 3.209471645063157, 0.35506352610807795, 4.076720465770152, 1.5212483878743517, 0.014251806548441187, 0.03589343871459262, 0.11753341696739152, 1.2522235457439004, 0.6684273219447909, 14.017443507422374, 3.3887628904071265, 4.70186452338264, 4.326918847398342, 4.735822531578308, 0.12210807092121213, 2.8751700099762645, 11.12239134756989, 0.08867790741252293, 0.05384015807188893, 0.11067143603666056, 0.5987518232635229, 5.043204087629256, 0.4731247877624488, 0.18157857232088032, 0.29717655876934773, 0.38497472503690516, 0.1652153870245219, 1.0164529188931448, 0.6158188014758538, 0.3297269811330714, 1.354801363246878, 0.987069564651297, 0.2139530464556109, 1.678194208136198, 0.45236289674126284, 0.8339946054272992] 
In [823]:
np.max(cause_l_percent_2004) #Married
Out[823]:
14.017443507422374
In [824]:
np.min(cause_l_percent_2004)  #Ideological Causes/Hero Worshipping
Out[824]:
0.014251806548441187
In [825]:
state_s_2004_percent=[]
tot=np.sum(state_s_2004)
for i in state_s_2004:
    xy=i/tot
    avg_state_2004=xy*100
    state_s_2004_percent.append(avg_state_2004)

print(state_s_2004_percent,end=" ")
[0.10734655162401255, 11.901388993986833, 0.06951129162538518, 2.4950154244676224, 0.3088413083608885, 0.06599173255574542, 3.9551045045076756, 0.03431570092898762, 0.011438566976329206, 1.1046136140064373, 0.2762853869667208, 4.200241793708084, 1.8319304957474927, 0.3237994344068575, 0.09854765394991315, 0.3669140330099445, 10.50324415357244, 7.965642064362177, 0.0, 5.9788509695505345, 12.959896384180992, 0.035899502510325504, 0.04839393720754664, 0.035899502510325504, 0.0272765827897081, 3.708735369632892, 0.4740846066804751, 0.5675288999794106, 3.2775893836020225, 0.08587724129921002, 11.296904723776205, 0.6775151209056529, 3.2001590840699476, 0.20853387487615554, 11.796682111665051] 
In [826]:
np.max(state_s_2004_percent) #Maharashtra
Out[826]:
12.959896384180992
In [827]:
np.min(state_s_2004_percent)  #Lakshdweep
Out[827]:
0.0
In [828]:
l_age_grp_2004=[s4_4,s4_5,s4_6,s4_7,s4_8,s4_54]
l_age_grp_2004
Out[828]:
[8733, 120407, 114872, 69400, 27543, 227394]
In [829]:
l_age_grp_2004_percent=[]
for i in l_age_grp_2004:
    yz=i/s4_1
    avg_2004_age_grp=yz*100
    l_age_grp_2004_percent.append(avg_2004_age_grp)
l_age_grp_2004_percent
Out[829]:
[1.5365558837967517,
 21.185398408372322,
 20.211524960895506,
 12.210807092121215,
 4.846142071156983,
 40.00957158365723]
In [830]:
np.max(l_age_grp_2004_percent)  #0-100+
Out[830]:
40.00957158365723
In [831]:
np.min(l_age_grp_2004_percent)  #0-14
Out[831]:
1.5365558837967517
In [832]:
total_male_percent_2004= (s4_2/s4_1)*100
total_male_percent_2004
Out[832]:
63.91073090653806
In [833]:
total_female_percent_2004= (s4_3/s4_1)*100
total_female_percent_2004
Out[833]:
36.08926909346194

2005

In [834]:
df_2005 = suicide_df.loc[(suicide_df["Year"]==2005)]

df_2005
Out[834]:
State Year Type Gender Age_group Total
135 A & N ISLANDS 2005 Cancellation/Non-Settlement of Marriage Male 15-29 0
136 A & N ISLANDS 2005 Drug Abuse/Addiction Male 30-44 0
137 A & N ISLANDS 2005 Love Affairs Male 30-44 2
138 A & N ISLANDS 2005 Not having Children(Barrenness/Impotency Male 60+ 0
139 A & N ISLANDS 2005 Paralysis Female 0-14 0
... ... ... ... ... ... ...
236460 WEST BENGAL 2005 Others Female 60+ 42
236461 WEST BENGAL 2005 Others Male 45-59 296
236462 WEST BENGAL 2005 Retired Person Female 45-59 0
236463 WEST BENGAL 2005 Self-employed (Business activity) Male 30-44 351
236464 WEST BENGAL 2005 Service (Private) Male 45-59 237

19725 rows × 6 columns

In [835]:
t2005_dcount = df_2005.loc[:,"Total"]

s5_1 = np.sum(t2005_dcount)

s5_1
Out[835]:
569545
In [836]:
male_2005 = df_2005.loc[(df_2005["Gender"]=="Male")]

male_2005
Out[836]:
State Year Type Gender Age_group Total
135 A & N ISLANDS 2005 Cancellation/Non-Settlement of Marriage Male 15-29 0
136 A & N ISLANDS 2005 Drug Abuse/Addiction Male 30-44 0
137 A & N ISLANDS 2005 Love Affairs Male 30-44 2
138 A & N ISLANDS 2005 Not having Children(Barrenness/Impotency Male 60+ 0
140 A & N ISLANDS 2005 Poverty Male 30-44 2
... ... ... ... ... ... ...
236454 WEST BENGAL 2005 By Hanging Male 0-14 66
236458 WEST BENGAL 2005 By Self Infliction of injury Male 60+ 0
236461 WEST BENGAL 2005 Others Male 45-59 296
236463 WEST BENGAL 2005 Self-employed (Business activity) Male 30-44 351
236464 WEST BENGAL 2005 Service (Private) Male 45-59 237

9872 rows × 6 columns

In [837]:
m2005_count = male_2005.loc[:,"Total"]
s5_2 = np.sum(m2005_count)

s5_2
Out[837]:
364557
In [838]:
female_2005 = df_2005.loc[(df_2005["Gender"]=="Female")]

female_2005
Out[838]:
State Year Type Gender Age_group Total
139 A & N ISLANDS 2005 Paralysis Female 0-14 0
144 A & N ISLANDS 2005 By Over Alcoholism Female 45-59 0
145 A & N ISLANDS 2005 By Self Infliction of injury Female 0-14 0
146 A & N ISLANDS 2005 House Wife Female 45-59 10
150 A & N ISLANDS 2005 Unemployed Female 0-14 0
... ... ... ... ... ... ...
236456 WEST BENGAL 2005 By Over Alcoholism Female 15-29 0
236457 WEST BENGAL 2005 By Over Alcoholism Female 60+ 0
236459 WEST BENGAL 2005 Others Female 60+ 36
236460 WEST BENGAL 2005 Others Female 60+ 42
236462 WEST BENGAL 2005 Retired Person Female 45-59 0

9853 rows × 6 columns

In [839]:
fm2005_count = female_2005.loc[:,"Total"]
s5_3 = np.sum(fm2005_count)
s5_3
Out[839]:
204988
In [840]:
df_age_d014_2005 = df_2005.loc[(df_2005["Age_group"]=="0-14")]

df_age_d014_2005
Out[840]:
State Year Type Gender Age_group Total
139 A & N ISLANDS 2005 Paralysis Female 0-14 0
143 A & N ISLANDS 2005 Others Male 0-14 0
145 A & N ISLANDS 2005 By Self Infliction of injury Female 0-14 0
150 A & N ISLANDS 2005 Unemployed Female 0-14 0
222 A & N ISLANDS 2005 Professional/Career Problem Male 0-14 0
... ... ... ... ... ... ...
236223 UTTARAKHAND 2005 Service (Private) Female 0-14 0
236443 WEST BENGAL 2005 Causes Not known Male 0-14 52
236449 WEST BENGAL 2005 By coming under running vehicles/trains Male 0-14 2
236450 WEST BENGAL 2005 By Consuming Insecticides Male 0-14 13
236454 WEST BENGAL 2005 By Hanging Male 0-14 66

3755 rows × 6 columns

In [841]:
t_014_2005 = df_age_d014_2005.loc[:,"Total"]

s5_4 = np.sum(t_014_2005)
s5_4
Out[841]:
7665
In [842]:
df_age_d1529_2005 = df_2005.loc[(df_2005["Age_group"]=="15-29")]

df_age_d1529_2005
Out[842]:
State Year Type Gender Age_group Total
135 A & N ISLANDS 2005 Cancellation/Non-Settlement of Marriage Male 15-29 0
147 A & N ISLANDS 2005 Retired Person Male 15-29 0
149 A & N ISLANDS 2005 Student Male 15-29 3
225 A & N ISLANDS 2005 By Jumping from (Other sites) Female 15-29 0
393 A & N ISLANDS 2005 Love Affairs Female 15-29 0
... ... ... ... ... ... ...
236213 UTTARAKHAND 2005 Drug Abuse/Addiction Male 15-29 2
236215 UTTARAKHAND 2005 Ideological Causes/Hero Worshipping Male 15-29 0
236444 WEST BENGAL 2005 Death of Dear Person Female 15-29 17
236445 WEST BENGAL 2005 Illness (Aids/STD) Male 15-29 3
236456 WEST BENGAL 2005 By Over Alcoholism Female 15-29 0

3769 rows × 6 columns

In [843]:
t_1529_2005 = df_age_d1529_2005.loc[:,"Total"]

s5_5 = np.sum(t_1529_2005)

s5_5
Out[843]:
120701
In [844]:
df_age_d3044_2005 = df_2005.loc[(df_2005["Age_group"]=="30-44")]

df_age_d3044_2005
Out[844]:
State Year Type Gender Age_group Total
136 A & N ISLANDS 2005 Drug Abuse/Addiction Male 30-44 0
137 A & N ISLANDS 2005 Love Affairs Male 30-44 2
140 A & N ISLANDS 2005 Poverty Male 30-44 2
141 A & N ISLANDS 2005 Unemployment Male 30-44 0
142 A & N ISLANDS 2005 By Jumping off Moving Vehicles/Trains Male 30-44 0
... ... ... ... ... ... ...
236217 UTTARAKHAND 2005 Illegitimate Pregnancy Male 30-44 0
236448 WEST BENGAL 2005 Professional/Career Problem Female 30-44 4
236451 WEST BENGAL 2005 By Consuming Insecticides Male 30-44 213
236453 WEST BENGAL 2005 By Fire-Arms Male 30-44 4
236463 WEST BENGAL 2005 Self-employed (Business activity) Male 30-44 351

3769 rows × 6 columns

In [845]:
t_3044_2005 = df_age_d3044_2005.loc[:,"Total"]

s5_6 = np.sum(t_3044_2005)
s5_6
Out[845]:
114548
In [846]:
df_age_d4559_2005 = df_2005.loc[(df_2005["Age_group"]=="45-59")]

df_age_d4559_2005
Out[846]:
State Year Type Gender Age_group Total
144 A & N ISLANDS 2005 By Over Alcoholism Female 45-59 0
146 A & N ISLANDS 2005 House Wife Female 45-59 10
148 A & N ISLANDS 2005 Service (Government) Male 45-59 7
220 A & N ISLANDS 2005 Dowry Dispute Male 45-59 0
396 A & N ISLANDS 2005 Property Dispute Female 45-59 1
... ... ... ... ... ... ...
236442 WEST BENGAL 2005 Cancellation/Non-Settlement of Marriage Female 45-59 0
236447 WEST BENGAL 2005 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
236461 WEST BENGAL 2005 Others Male 45-59 296
236462 WEST BENGAL 2005 Retired Person Female 45-59 0
236464 WEST BENGAL 2005 Service (Private) Male 45-59 237

3764 rows × 6 columns

In [847]:
t_4559_2005 = df_age_d4559_2005.loc[:,"Total"]

s5_7 = np.sum(t_4559_2005)

s5_7
Out[847]:
70874
In [848]:
df_age_d60_2005 = df_2005.loc[(df_2005["Age_group"]=="60+")]

df_age_d60_2005
Out[848]:
State Year Type Gender Age_group Total
138 A & N ISLANDS 2005 Not having Children(Barrenness/Impotency Male 60+ 0
223 A & N ISLANDS 2005 Suspected/Illicit Relation Female 60+ 0
230 A & N ISLANDS 2005 Service (Private) Female 60+ 0
316 A & N ISLANDS 2005 Cancellation/Non-Settlement of Marriage Male 60+ 0
388 A & N ISLANDS 2005 Death of Dear Person Female 60+ 0
... ... ... ... ... ... ...
236455 WEST BENGAL 2005 By Jumping from (Other sites) Female 60+ 0
236457 WEST BENGAL 2005 By Over Alcoholism Female 60+ 0
236458 WEST BENGAL 2005 By Self Infliction of injury Male 60+ 0
236459 WEST BENGAL 2005 Others Female 60+ 36
236460 WEST BENGAL 2005 Others Female 60+ 42

3758 rows × 6 columns

In [849]:
t_60_2005 = df_age_d60_2005.loc[:,"Total"]

s5_8 = np.sum(t_60_2005)
s5_8
Out[849]:
27929
In [850]:
df_age_d0100_2005 = df_2005.loc[(df_2005["Age_group"]=="0-100+")]

df_age_d0100_2005
Out[850]:
State Year Type Gender Age_group Total
151 A & N ISLANDS 2005 Married Female 0-100+ 35
224 A & N ISLANDS 2005 Middle Male 0-100+ 37
397 A & N ISLANDS 2005 Post Graduate and Above Male 0-100+ 0
463 A & N ISLANDS 2005 Matriculate/Secondary Female 0-100+ 18
1194 A & N ISLANDS 2005 Divorcee Female 0-100+ 0
... ... ... ... ... ... ...
234110 MIZORAM 2005 Post Graduate and Above Male 0-100+ 0
234120 MIZORAM 2005 Never Married Male 0-100+ 17
234518 ODISHA 2005 Matriculate/Secondary Male 0-100+ 443
234942 PUNJAB 2005 Never Married Male 0-100+ 143
236220 UTTARAKHAND 2005 Post Graduate and Above Male 0-100+ 1

910 rows × 6 columns

In [851]:
t_0100_2005 = df_age_d0100_2005.loc[:,"Total"]

s5_54 = np.sum(t_0100_2005)
s5_54
Out[851]:
227828
In [852]:
df_014m_2005 = df_age_d014_2005.loc[(df_age_d014_2005["Gender"]=="Male")]
df_014m_2005
Out[852]:
State Year Type Gender Age_group Total
143 A & N ISLANDS 2005 Others Male 0-14 0
222 A & N ISLANDS 2005 Professional/Career Problem Male 0-14 0
315 A & N ISLANDS 2005 Bankruptcy or Sudden change in Economic Male 0-14 0
389 A & N ISLANDS 2005 Divorce Male 0-14 0
1110 A & N ISLANDS 2005 Insanity/Mental Illness Male 0-14 0
... ... ... ... ... ... ...
236003 UTTAR PRADESH 2005 Public Sector Undertaking Male 0-14 0
236443 WEST BENGAL 2005 Causes Not known Male 0-14 52
236449 WEST BENGAL 2005 By coming under running vehicles/trains Male 0-14 2
236450 WEST BENGAL 2005 By Consuming Insecticides Male 0-14 13
236454 WEST BENGAL 2005 By Hanging Male 0-14 66

1877 rows × 6 columns

In [853]:
t_014m_2005 = df_014m_2005.loc[:,"Total"]

s5_9 = np.sum(t_014m_2005)
s5_9
Out[853]:
3984
In [854]:
df_014fm_2005 = df_age_d014_2005.loc[(df_age_d014_2005["Gender"]=="Female")]
df_014fm_2005
Out[854]:
State Year Type Gender Age_group Total
139 A & N ISLANDS 2005 Paralysis Female 0-14 0
145 A & N ISLANDS 2005 By Self Infliction of injury Female 0-14 0
150 A & N ISLANDS 2005 Unemployed Female 0-14 0
229 A & N ISLANDS 2005 Professional Activity Female 0-14 0
458 A & N ISLANDS 2005 Bankruptcy or Sudden change in Economic Female 0-14 0
... ... ... ... ... ... ...
235805 TRIPURA 2005 Cancellation/Non-Settlement of Marriage Female 0-14 0
235816 TRIPURA 2005 Physical Abuse (Rape/Incest Etc.) Female 0-14 0
235985 UTTAR PRADESH 2005 Dowry Dispute Female 0-14 0
236214 UTTARAKHAND 2005 Failure in Examination Female 0-14 1
236223 UTTARAKHAND 2005 Service (Private) Female 0-14 0

1878 rows × 6 columns

In [855]:
t_014fm_2005 = df_014fm_2005.loc[:,"Total"]

s5_10 = np.sum(t_014fm_2005)
s5_10
Out[855]:
3681
In [856]:
df_1529m_2005 = df_age_d1529_2005.loc[(df_age_d1529_2005["Gender"]=="Male")]
df_1529m_2005
Out[856]:
State Year Type Gender Age_group Total
135 A & N ISLANDS 2005 Cancellation/Non-Settlement of Marriage Male 15-29 0
147 A & N ISLANDS 2005 Retired Person Male 15-29 0
149 A & N ISLANDS 2005 Student Male 15-29 3
469 A & N ISLANDS 2005 Farming/Agriculture Activity Male 15-29 0
633 A & N ISLANDS 2005 Paralysis Male 15-29 0
... ... ... ... ... ... ...
235997 UTTAR PRADESH 2005 By Consuming Other Poison Male 15-29 46
236212 UTTARAKHAND 2005 Dowry Dispute Male 15-29 0
236213 UTTARAKHAND 2005 Drug Abuse/Addiction Male 15-29 2
236215 UTTARAKHAND 2005 Ideological Causes/Hero Worshipping Male 15-29 0
236445 WEST BENGAL 2005 Illness (Aids/STD) Male 15-29 3

1885 rows × 6 columns

In [857]:
t_1529m_2005 = df_1529m_2005.loc[:,"Total"]

s5_11 = np.sum(t_1529m_2005)
s5_11
Out[857]:
65468
In [858]:
df_1529fm_2005 = df_age_d1529_2005.loc[(df_age_d1529_2005["Gender"]=="Female")]
df_1529fm_2005
Out[858]:
State Year Type Gender Age_group Total
225 A & N ISLANDS 2005 By Jumping from (Other sites) Female 15-29 0
393 A & N ISLANDS 2005 Love Affairs Female 15-29 0
460 A & N ISLANDS 2005 Drug Abuse/Addiction Female 15-29 0
462 A & N ISLANDS 2005 Suspected/Illicit Relation Female 15-29 0
466 A & N ISLANDS 2005 By Jumping from (Building) Female 15-29 0
... ... ... ... ... ... ...
235823 TRIPURA 2005 Student Female 15-29 28
235991 UTTAR PRADESH 2005 Not having Children(Barrenness/Impotency Female 15-29 14
236000 UTTAR PRADESH 2005 Others Female 15-29 49
236444 WEST BENGAL 2005 Death of Dear Person Female 15-29 17
236456 WEST BENGAL 2005 By Over Alcoholism Female 15-29 0

1884 rows × 6 columns

In [859]:
t_1529fm_2005 = df_1529fm_2005.loc[:,"Total"]

s5_12 = np.sum(t_1529fm_2005)
s5_12
Out[859]:
55233
In [860]:
df_3044m_2005 = df_age_d3044_2005.loc[(df_age_d3044_2005["Gender"]=="Male")]
df_3044m_2005
Out[860]:
State Year Type Gender Age_group Total
136 A & N ISLANDS 2005 Drug Abuse/Addiction Male 30-44 0
137 A & N ISLANDS 2005 Love Affairs Male 30-44 2
140 A & N ISLANDS 2005 Poverty Male 30-44 2
141 A & N ISLANDS 2005 Unemployment Male 30-44 0
142 A & N ISLANDS 2005 By Jumping off Moving Vehicles/Trains Male 30-44 0
... ... ... ... ... ... ...
236002 UTTAR PRADESH 2005 Farming/Agriculture Activity Male 30-44 164
236217 UTTARAKHAND 2005 Illegitimate Pregnancy Male 30-44 0
236451 WEST BENGAL 2005 By Consuming Insecticides Male 30-44 213
236453 WEST BENGAL 2005 By Fire-Arms Male 30-44 4
236463 WEST BENGAL 2005 Self-employed (Business activity) Male 30-44 351

1887 rows × 6 columns

In [861]:
t_3044m_2005 = df_3044m_2005.loc[:,"Total"]

s5_13 = np.sum(t_3044m_2005)
s5_13
Out[861]:
77795
In [862]:
df_3044fm_2005 = df_age_d3044_2005.loc[(df_age_d3044_2005["Gender"]=="Female")]
df_3044fm_2005
Out[862]:
State Year Type Gender Age_group Total
219 A & N ISLANDS 2005 Dowry Dispute Female 30-44 0
221 A & N ISLANDS 2005 Ideological Causes/Hero Worshipping Female 30-44 0
226 A & N ISLANDS 2005 By Overdose of sleeping pills Female 30-44 0
227 A & N ISLANDS 2005 By Self Infliction of injury Female 30-44 0
394 A & N ISLANDS 2005 Love Affairs Female 30-44 0
... ... ... ... ... ... ...
235591 TAMIL NADU 2005 By Drowning Female 30-44 58
235807 TRIPURA 2005 Drug Abuse/Addiction Female 30-44 0
235820 TRIPURA 2005 By Machine Female 30-44 0
235993 UTTAR PRADESH 2005 Paralysis Female 30-44 0
236448 WEST BENGAL 2005 Professional/Career Problem Female 30-44 4

1882 rows × 6 columns

In [863]:
t_3044fm_2005 = df_3044fm_2005.loc[:,"Total"]

s5_14 = np.sum(t_3044fm_2005)
s5_14
Out[863]:
36753
In [864]:
df_4559m_2005 = df_age_d4559_2005.loc[(df_age_d4559_2005["Gender"]=="Male")]
df_4559m_2005
Out[864]:
State Year Type Gender Age_group Total
148 A & N ISLANDS 2005 Service (Government) Male 45-59 7
220 A & N ISLANDS 2005 Dowry Dispute Male 45-59 0
465 A & N ISLANDS 2005 By Fire-Arms Male 45-59 0
468 A & N ISLANDS 2005 By Overdose of sleeping pills Male 45-59 0
470 A & N ISLANDS 2005 Others Male 45-59 2
... ... ... ... ... ... ...
235990 UTTAR PRADESH 2005 Love Affairs Male 45-59 4
236209 UTTARAKHAND 2005 Cancer Male 45-59 2
236222 UTTARAKHAND 2005 By Jumping off Moving Vehicles/Trains Male 45-59 0
236461 WEST BENGAL 2005 Others Male 45-59 296
236464 WEST BENGAL 2005 Service (Private) Male 45-59 237

1887 rows × 6 columns

In [865]:
t_4559m_2005 = df_4559m_2005.loc[:,"Total"]

s5_15 = np.sum(t_4559m_2005)
s5_15
Out[865]:
51708
In [866]:
df_4559fm_2005 = df_age_d4559_2005.loc[(df_age_d4559_2005["Gender"]=="Female")]
df_4559fm_2005
Out[866]:
State Year Type Gender Age_group Total
144 A & N ISLANDS 2005 By Over Alcoholism Female 45-59 0
146 A & N ISLANDS 2005 House Wife Female 45-59 10
396 A & N ISLANDS 2005 Property Dispute Female 45-59 1
459 A & N ISLANDS 2005 Cancer Female 45-59 0
630 A & N ISLANDS 2005 Death of Dear Person Female 45-59 0
... ... ... ... ... ... ...
236219 UTTARAKHAND 2005 Professional/Career Problem Female 45-59 0
236221 UTTARAKHAND 2005 By Jumping from (Building) Female 45-59 0
236442 WEST BENGAL 2005 Cancellation/Non-Settlement of Marriage Female 45-59 0
236447 WEST BENGAL 2005 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
236462 WEST BENGAL 2005 Retired Person Female 45-59 0

1877 rows × 6 columns

In [867]:
t_4559fm_2005 = df_4559fm_2005.loc[:,"Total"]

s5_16 = np.sum(t_4559fm_2005)
s5_16
Out[867]:
19166
In [868]:
df_60m_2005 = df_age_d60_2005.loc[(df_age_d60_2005["Gender"]=="Male")]
df_60m_2005
Out[868]:
State Year Type Gender Age_group Total
138 A & N ISLANDS 2005 Not having Children(Barrenness/Impotency Male 60+ 0
316 A & N ISLANDS 2005 Cancellation/Non-Settlement of Marriage Male 60+ 0
392 A & N ISLANDS 2005 Illness (Aids/STD) Male 60+ 0
628 A & N ISLANDS 2005 Bankruptcy or Sudden change in Economic Male 60+ 0
629 A & N ISLANDS 2005 Cancer Male 60+ 0
... ... ... ... ... ... ...
236216 UTTARAKHAND 2005 Ideological Causes/Hero Worshipping Male 60+ 0
236218 UTTARAKHAND 2005 Insanity/Mental Illness Male 60+ 1
236446 WEST BENGAL 2005 Illness (Aids/STD) Male 60+ 0
236452 WEST BENGAL 2005 By Consuming Other Poison Male 60+ 185
236458 WEST BENGAL 2005 By Self Infliction of injury Male 60+ 0

1881 rows × 6 columns

In [869]:
t_60m_2005 = df_60m_2005.loc[:,"Total"]

s5_17 = np.sum(t_60m_2005)
s5_17
Out[869]:
19770
In [870]:
df_60fm_2005 = df_age_d60_2005.loc[(df_age_d60_2005["Gender"]=="Female")]
df_60fm_2005
Out[870]:
State Year Type Gender Age_group Total
223 A & N ISLANDS 2005 Suspected/Illicit Relation Female 60+ 0
230 A & N ISLANDS 2005 Service (Private) Female 60+ 0
388 A & N ISLANDS 2005 Death of Dear Person Female 60+ 0
395 A & N ISLANDS 2005 Poverty Female 60+ 0
464 A & N ISLANDS 2005 By Consuming Other Poison Female 60+ 0
... ... ... ... ... ... ...
235995 UTTAR PRADESH 2005 Poverty Female 60+ 0
236455 WEST BENGAL 2005 By Jumping from (Other sites) Female 60+ 0
236457 WEST BENGAL 2005 By Over Alcoholism Female 60+ 0
236459 WEST BENGAL 2005 Others Female 60+ 36
236460 WEST BENGAL 2005 Others Female 60+ 42

1877 rows × 6 columns

In [871]:
t_60fm_2005 = df_60fm_2005.loc[:,"Total"]

s5_18 = np.sum(t_60fm_2005)
s5_18
Out[871]:
8159
In [872]:
df_0100fm_2005 = df_age_d0100_2005.loc[(df_age_d0100_2005["Gender"]=="Female")]
df_0100fm_2005
Out[872]:
State Year Type Gender Age_group Total
151 A & N ISLANDS 2005 Married Female 0-100+ 35
463 A & N ISLANDS 2005 Matriculate/Secondary Female 0-100+ 18
1194 A & N ISLANDS 2005 Divorcee Female 0-100+ 0
2062 A & N ISLANDS 2005 Graduate Female 0-100+ 1
2220 A & N ISLANDS 2005 No Education Female 0-100+ 4
... ... ... ... ... ... ...
231762 HARYANA 2005 Graduate Female 0-100+ 2
232646 KARNATAKA 2005 Middle Female 0-100+ 832
232848 KERALA 2005 Widowed/Widower Female 0-100+ 150
233060 LAKSHADWEEP 2005 Seperated Female 0-100+ 0
233504 MAHARASHTRA 2005 Diploma Female 0-100+ 20

455 rows × 6 columns

In [873]:
t_0100fm_2005 = df_0100fm_2005.loc[:,"Total"]

s5_55 = np.sum(t_0100fm_2005)
s5_55
Out[873]:
81996
In [874]:
df_0100m_2005 = df_age_d0100_2005.loc[(df_age_d0100_2005["Gender"]=="Male")]
df_0100m_2005
Out[874]:
State Year Type Gender Age_group Total
224 A & N ISLANDS 2005 Middle Male 0-100+ 37
397 A & N ISLANDS 2005 Post Graduate and Above Male 0-100+ 0
1512 A & N ISLANDS 2005 Divorcee Male 0-100+ 0
1581 A & N ISLANDS 2005 Seperated Male 0-100+ 0
1914 A & N ISLANDS 2005 Graduate Male 0-100+ 1
... ... ... ... ... ... ...
234110 MIZORAM 2005 Post Graduate and Above Male 0-100+ 0
234120 MIZORAM 2005 Never Married Male 0-100+ 17
234518 ODISHA 2005 Matriculate/Secondary Male 0-100+ 443
234942 PUNJAB 2005 Never Married Male 0-100+ 143
236220 UTTARAKHAND 2005 Post Graduate and Above Male 0-100+ 1

455 rows × 6 columns

In [875]:
t_0100m_2005 = df_0100m_2005.loc[:,"Total"]

s5_56 = np.sum(t_0100m_2005)
s5_56
Out[875]:
145832
In [876]:
df_st_AN_2005 = df_2005.loc[(df_2005["State"]=="A & N ISLANDS")]

df_st_AN_2005
Out[876]:
State Year Type Gender Age_group Total
135 A & N ISLANDS 2005 Cancellation/Non-Settlement of Marriage Male 15-29 0
136 A & N ISLANDS 2005 Drug Abuse/Addiction Male 30-44 0
137 A & N ISLANDS 2005 Love Affairs Male 30-44 2
138 A & N ISLANDS 2005 Not having Children(Barrenness/Impotency Male 60+ 0
139 A & N ISLANDS 2005 Paralysis Female 0-14 0
... ... ... ... ... ... ...
7952 A & N ISLANDS 2005 Others Female 0-14 0
7953 A & N ISLANDS 2005 By Self Infliction of injury Male 30-44 0
7954 A & N ISLANDS 2005 By touching electric wires Female 30-44 0
7955 A & N ISLANDS 2005 Professional Activity Female 45-59 0
7956 A & N ISLANDS 2005 Widowed/Widower Female 0-100+ 0

558 rows × 6 columns

In [877]:
t_AN_2005 = df_st_AN_2005.loc[:,"Total"]

s5_19 = np.sum(t_AN_2005)
s5_19
Out[877]:
695
In [878]:
df_st_AP_2005 = df_2005.loc[(df_2005["State"]=="ANDHRA PRADESH")]

df_st_AP_2005
Out[878]:
State Year Type Gender Age_group Total
5338 ANDHRA PRADESH 2005 Cancellation/Non-Settlement of Marriage Male 45-59 0
5339 ANDHRA PRADESH 2005 Dowry Dispute Female 15-29 166
5340 ANDHRA PRADESH 2005 Drug Abuse/Addiction Female 15-29 2
5341 ANDHRA PRADESH 2005 Failure in Examination Female 15-29 91
7280 ANDHRA PRADESH 2005 Causes Not known Male 0-14 22
... ... ... ... ... ... ...
229412 ANDHRA PRADESH 2005 Public Sector Undertaking Female 30-44 36
229413 ANDHRA PRADESH 2005 Public Sector Undertaking Male 45-59 80
229414 ANDHRA PRADESH 2005 Retired Person Male 60+ 20
229415 ANDHRA PRADESH 2005 Self-employed (Business activity) Male 30-44 304
229416 ANDHRA PRADESH 2005 Service (Government) Female 45-59 0

566 rows × 6 columns

In [879]:
t_AP_2005 = df_st_AP_2005.loc[:,"Total"]

s5_20 = np.sum(t_AP_2005)
s5_20
Out[879]:
67210
In [880]:
df_st_ARP_2005 = df_2005.loc[(df_2005["State"]=="ARUNACHAL PRADESH")]

df_st_ARP_2005
Out[880]:
State Year Type Gender Age_group Total
11860 ARUNACHAL PRADESH 2005 Cancer Female 15-29 0
11861 ARUNACHAL PRADESH 2005 Causes Not known Female 60+ 1
11862 ARUNACHAL PRADESH 2005 Poverty Female 30-44 0
11863 ARUNACHAL PRADESH 2005 Professional/Career Problem Female 60+ 0
11864 ARUNACHAL PRADESH 2005 Property Dispute Male 45-59 0
... ... ... ... ... ... ...
229624 ARUNACHAL PRADESH 2005 House Wife Female 15-29 1
229625 ARUNACHAL PRADESH 2005 Retired Person Male 60+ 0
229626 ARUNACHAL PRADESH 2005 Service (Government) Female 15-29 1
229627 ARUNACHAL PRADESH 2005 Service (Private) Female 30-44 1
229628 ARUNACHAL PRADESH 2005 Unemployed Male 15-29 1

556 rows × 6 columns

In [881]:
t_ARP_2005 = df_st_ARP_2005.loc[:,"Total"]

s5_21 = np.sum(t_ARP_2005)
s5_21
Out[881]:
350
In [882]:
df_st_AS_2005 = df_2005.loc[(df_2005["State"]=="ASSAM")]

df_st_AS_2005
Out[882]:
State Year Type Gender Age_group Total
17015 ASSAM 2005 Cancer Female 0-14 0
17016 ASSAM 2005 Dowry Dispute Female 30-44 1
17017 ASSAM 2005 Failure in Examination Female 0-14 9
17018 ASSAM 2005 Family Problems Female 30-44 33
17019 ASSAM 2005 Not having Children(Barrenness/Impotency Female 45-59 2
... ... ... ... ... ... ...
229817 ASSAM 2005 By Self Infliction of injury Female 15-29 2
229818 ASSAM 2005 Professional Activity Female 0-14 0
229819 ASSAM 2005 Self-employed (Business activity) Female 0-14 0
229820 ASSAM 2005 Service (Government) Female 0-14 0
229821 ASSAM 2005 Unemployed Male 0-14 0

565 rows × 6 columns

In [883]:
t_AS_2005 = df_st_AS_2005.loc[:,"Total"]

s5_22 = np.sum(t_AS_2005)
s5_22
Out[883]:
14209
In [884]:
df_st_BH_2005 = df_2005.loc[(df_2005["State"]=="BIHAR")]

df_st_BH_2005
Out[884]:
State Year Type Gender Age_group Total
22033 BIHAR 2005 Cancer Male 60+ 1
22034 BIHAR 2005 Death of Dear Person Female 45-59 1
22035 BIHAR 2005 Ideological Causes/Hero Worshipping Female 15-29 0
22036 BIHAR 2005 Illegitimate Pregnancy Male 60+ 0
22037 BIHAR 2005 Insanity/Mental Illness Female 30-44 1
... ... ... ... ... ... ...
230035 BIHAR 2005 By Overdose of sleeping pills Male 30-44 1
230036 BIHAR 2005 House Wife Male 45-59 0
230037 BIHAR 2005 Others Male 0-14 5
230038 BIHAR 2005 Public Sector Undertaking Female 45-59 0
230039 BIHAR 2005 Widowed/Widower Female 0-100+ 4

566 rows × 6 columns

In [885]:
t_BH_2005 = df_st_BH_2005.loc[:,"Total"]

s5_23 = np.sum(t_BH_2005)
s5_23
Out[885]:
2715
In [886]:
df_st_CH_2005 = df_2005.loc[(df_2005["State"]=="CHANDIGARH")]

df_st_CH_2005
Out[886]:
State Year Type Gender Age_group Total
30480 CHANDIGARH 2005 Death of Dear Person Male 60+ 0
30481 CHANDIGARH 2005 Divorce Male 60+ 0
30482 CHANDIGARH 2005 Failure in Examination Female 45-59 0
30483 CHANDIGARH 2005 Ideological Causes/Hero Worshipping Male 0-14 0
30484 CHANDIGARH 2005 Illegitimate Pregnancy Female 30-44 0
... ... ... ... ... ... ...
230252 CHANDIGARH 2005 By Jumping from (Building) Female 0-14 0
230253 CHANDIGARH 2005 By Jumping from (Building) Male 45-59 0
230254 CHANDIGARH 2005 Others Female 60+ 0
230255 CHANDIGARH 2005 Service (Private) Male 0-14 0
230256 CHANDIGARH 2005 Seperated Female 0-100+ 0

563 rows × 6 columns

In [887]:
t_CH_2005 = df_st_CH_2005.loc[:,"Total"]

s5_24 = np.sum(t_CH_2005)
s5_24
Out[887]:
445
In [888]:
df_st_CT_2005 = df_2005.loc[(df_2005["State"]=="CHHATTISGARH")]

df_st_CT_2005
Out[888]:
State Year Type Gender Age_group Total
36948 CHHATTISGARH 2005 Bankruptcy or Sudden change in Economic Male 0-14 0
36949 CHHATTISGARH 2005 Cancellation/Non-Settlement of Marriage Male 60+ 0
36950 CHHATTISGARH 2005 Illness (Aids/STD) Female 45-59 1
36951 CHHATTISGARH 2005 Others Female 30-44 115
36952 CHHATTISGARH 2005 Others Female 45-59 68
... ... ... ... ... ... ...
230493 CHHATTISGARH 2005 Others Female 60+ 9
230494 CHHATTISGARH 2005 Others Male 60+ 61
230495 CHHATTISGARH 2005 Retired Person Female 15-29 0
230496 CHHATTISGARH 2005 Student Male 30-44 6
230497 CHHATTISGARH 2005 Married Male 0-100+ 2672

566 rows × 6 columns

In [889]:
t_CT_2005 = df_st_CT_2005.loc[:,"Total"]

s5_25 = np.sum(t_CT_2005)
s5_25
Out[889]:
24405
In [890]:
df_st_DN_2005 = df_2005.loc[(df_2005["State"]=="D & N HAVELI")]

df_st_DN_2005
Out[890]:
State Year Type Gender Age_group Total
43118 D & N HAVELI 2005 Cancellation/Non-Settlement of Marriage Male 30-44 0
43119 D & N HAVELI 2005 Divorce Male 45-59 0
43120 D & N HAVELI 2005 Dowry Dispute Female 30-44 0
43121 D & N HAVELI 2005 Ideological Causes/Hero Worshipping Female 45-59 0
43122 D & N HAVELI 2005 By coming under running vehicles/trains Female 15-29 0
... ... ... ... ... ... ...
230700 D & N HAVELI 2005 By Hanging Male 15-29 9
230701 D & N HAVELI 2005 By Jumping from (Building) Male 15-29 0
230702 D & N HAVELI 2005 By Jumping from (Building) Male 60+ 0
230703 D & N HAVELI 2005 Others Female 60+ 0
230704 D & N HAVELI 2005 Service (Private) Female 45-59 0

561 rows × 6 columns

In [891]:
t_DN_2005 = df_st_DN_2005.loc[:,"Total"]

s5_26 = np.sum(t_DN_2005)
s5_26
Out[891]:
345
In [892]:
df_st_DD_2005 = df_2005.loc[(df_2005["State"]=="DAMAN & DIU")]

df_st_DD_2005
Out[892]:
State Year Type Gender Age_group Total
48418 DAMAN & DIU 2005 Cancellation/Non-Settlement of Marriage Female 60+ 0
48419 DAMAN & DIU 2005 Death of Dear Person Male 45-59 0
48420 DAMAN & DIU 2005 Family Problems Female 0-14 0
48421 DAMAN & DIU 2005 Family Problems Male 45-59 0
48422 DAMAN & DIU 2005 Ideological Causes/Hero Worshipping Female 60+ 0
... ... ... ... ... ... ...
230898 DAMAN & DIU 2005 By Fire-Arms Male 15-29 0
230899 DAMAN & DIU 2005 By Overdose of sleeping pills Female 30-44 0
230900 DAMAN & DIU 2005 By Self Infliction of injury Female 30-44 0
230901 DAMAN & DIU 2005 Public Sector Undertaking Male 0-14 0
230902 DAMAN & DIU 2005 Service (Private) Male 60+ 0

559 rows × 6 columns

In [893]:
t_DD_2005 = df_st_DD_2005.loc[:,"Total"]

s5_27 = np.sum(t_DD_2005)
s5_27
Out[893]:
159
In [894]:
df_st_DL_2005 = df_2005.loc[(df_2005["State"]=="DELHI (UT)")]

df_st_DL_2005
Out[894]:
State Year Type Gender Age_group Total
55087 DELHI (UT) 2005 Failure in Examination Female 0-14 2
55088 DELHI (UT) 2005 Others Female 30-44 16
55089 DELHI (UT) 2005 Poverty Female 60+ 0
55090 DELHI (UT) 2005 Professional/Career Problem Female 45-59 0
55091 DELHI (UT) 2005 Property Dispute Male 30-44 4
... ... ... ... ... ... ...
231120 DELHI (UT) 2005 By Self Infliction of injury Male 60+ 0
231121 DELHI (UT) 2005 By touching electric wires Female 0-14 1
231122 DELHI (UT) 2005 Others Male 30-44 54
231123 DELHI (UT) 2005 Retired Person Female 45-59 0
231124 DELHI (UT) 2005 Service (Government) Male 15-29 7

565 rows × 6 columns

In [895]:
t_DL_2005 = df_st_DL_2005.loc[:,"Total"]

s5_28 = np.sum(t_DL_2005)
s5_28
Out[895]:
6224
In [896]:
df_st_GOA_2005 = df_2005.loc[(df_2005["State"]=="GOA")]

df_st_GOA_2005
Out[896]:
State Year Type Gender Age_group Total
60620 GOA 2005 Bankruptcy or Sudden change in Economic Female 15-29 0
60621 GOA 2005 Bankruptcy or Sudden change in Economic Male 15-29 1
60622 GOA 2005 Failure in Examination Female 30-44 0
60623 GOA 2005 Love Affairs Female 60+ 0
60624 GOA 2005 Love Affairs Male 60+ 0
... ... ... ... ... ... ...
231362 GOA 2005 By Over Alcoholism Male 45-59 8
231363 GOA 2005 By Self Infliction of injury Male 60+ 1
231364 GOA 2005 Retired Person Female 30-44 0
231365 GOA 2005 Service (Government) Male 15-29 2
231366 GOA 2005 Service (Private) Female 0-14 0

564 rows × 6 columns

In [897]:
t_GOA_2005 = df_st_GOA_2005.loc[:,"Total"]

s5_29 = np.sum(t_GOA_2005)
s5_29
Out[897]:
1410
In [898]:
df_st_GJ_2005 = df_2005.loc[(df_2005["State"]=="GUJARAT")]

df_st_GJ_2005
Out[898]:
State Year Type Gender Age_group Total
65803 GUJARAT 2005 Cancellation/Non-Settlement of Marriage Male 0-14 0
65804 GUJARAT 2005 Causes Not known Female 45-59 24
65805 GUJARAT 2005 Death of Dear Person Female 60+ 2
65806 GUJARAT 2005 Divorce Male 60+ 0
65807 GUJARAT 2005 Failure in Examination Female 45-59 0
... ... ... ... ... ... ...
231576 GUJARAT 2005 Others Male 15-29 27
231577 GUJARAT 2005 By Over Alcoholism Female 15-29 0
231578 GUJARAT 2005 By Over Alcoholism Female 60+ 0
231579 GUJARAT 2005 By Self Infliction of injury Male 15-29 6
231580 GUJARAT 2005 By touching electric wires Female 30-44 3

566 rows × 6 columns

In [899]:
t_GJ_2005 = df_st_GJ_2005.loc[:,"Total"]

s5_30 = np.sum(t_GJ_2005)
s5_30
Out[899]:
23825
In [900]:
df_st_HR_2005 = df_2005.loc[(df_2005["State"]=="HARYANA")]

df_st_HR_2005
Out[900]:
State Year Type Gender Age_group Total
72337 HARYANA 2005 Cancer Male 60+ 2
72338 HARYANA 2005 Causes Not known Female 30-44 9
72339 HARYANA 2005 Professional/Career Problem Female 60+ 0
72340 HARYANA 2005 Middle Male 0-100+ 314
72341 HARYANA 2005 By coming under running vehicles/trains Female 45-59 0
... ... ... ... ... ... ...
231766 HARYANA 2005 By Fire-Arms Female 15-29 1
231767 HARYANA 2005 Others Female 15-29 79
231768 HARYANA 2005 Others Female 45-59 18
231769 HARYANA 2005 Professional Activity Female 0-14 1
231770 HARYANA 2005 Student Female 45-59 0

566 rows × 6 columns

In [901]:
t_HR_2005 = df_st_HR_2005.loc[:,"Total"]

s5_31 = np.sum(t_HR_2005)
s5_31
Out[901]:
10230
In [902]:
df_st_HP_2005 = df_2005.loc[(df_2005["State"]=="HIMACHAL PRADESH")]

df_st_HP_2005
Out[902]:
State Year Type Gender Age_group Total
78632 HIMACHAL PRADESH 2005 Bankruptcy or Sudden change in Economic Female 30-44 0
78633 HIMACHAL PRADESH 2005 Death of Dear Person Male 30-44 0
78634 HIMACHAL PRADESH 2005 Dowry Dispute Female 60+ 0
78635 HIMACHAL PRADESH 2005 Ideological Causes/Hero Worshipping Female 60+ 0
78636 HIMACHAL PRADESH 2005 Illegitimate Pregnancy Male 60+ 0
... ... ... ... ... ... ...
232021 HIMACHAL PRADESH 2005 By Jumping from (Building) Female 15-29 0
232022 HIMACHAL PRADESH 2005 By Jumping off Moving Vehicles/Trains Male 15-29 0
232023 HIMACHAL PRADESH 2005 Others Male 15-29 1
232024 HIMACHAL PRADESH 2005 House Wife Female 45-59 8
232025 HIMACHAL PRADESH 2005 Service (Government) Male 0-14 0

565 rows × 6 columns

In [903]:
t_HP_2005 = df_st_HP_2005.loc[:,"Total"]

s5_32 = np.sum(t_HP_2005)
s5_32
Out[903]:
1795
In [904]:
df_st_JK_2005 = df_2005.loc[(df_2005["State"]=="JAMMU & KASHMIR")]

df_st_JK_2005
Out[904]:
State Year Type Gender Age_group Total
86039 JAMMU & KASHMIR 2005 Dowry Dispute Male 60+ 0
86040 JAMMU & KASHMIR 2005 Drug Abuse/Addiction Male 30-44 5
86041 JAMMU & KASHMIR 2005 Drug Abuse/Addiction Male 45-59 0
86042 JAMMU & KASHMIR 2005 Love Affairs Female 60+ 0
86043 JAMMU & KASHMIR 2005 Not having Children(Barrenness/Impotency Male 45-59 0
... ... ... ... ... ... ...
232241 JAMMU & KASHMIR 2005 By Hanging Male 0-14 0
232242 JAMMU & KASHMIR 2005 By Jumping from (Building) Male 15-29 0
232243 JAMMU & KASHMIR 2005 By Jumping from (Building) Male 60+ 0
232244 JAMMU & KASHMIR 2005 By Jumping off Moving Vehicles/Trains Female 45-59 0
232245 JAMMU & KASHMIR 2005 Service (Private) Female 45-59 0

565 rows × 6 columns

In [905]:
t_JK_2005 = df_st_JK_2005.loc[:,"Total"]

s5_33 = np.sum(t_JK_2005)
s5_33
Out[905]:
1470
In [906]:
df_st_JH_2005 = df_2005.loc[(df_2005["State"]=="JHARKHAND")]

df_st_JH_2005
Out[906]:
State Year Type Gender Age_group Total
91768 JHARKHAND 2005 Death of Dear Person Female 60+ 0
91769 JHARKHAND 2005 Failure in Examination Female 30-44 5
91770 JHARKHAND 2005 Love Affairs Female 15-29 10
91771 JHARKHAND 2005 Others Male 15-29 94
91772 JHARKHAND 2005 Paralysis Male 0-14 0
... ... ... ... ... ... ...
232463 JHARKHAND 2005 By Drowning Male 15-29 20
232464 JHARKHAND 2005 By Machine Female 30-44 0
232465 JHARKHAND 2005 By touching electric wires Female 60+ 1
232466 JHARKHAND 2005 Farming/Agriculture Activity Male 0-14 0
232467 JHARKHAND 2005 Service (Private) Male 45-59 6

566 rows × 6 columns

In [907]:
t_JH_2005 = df_st_JH_2005.loc[:,"Total"]

s5_34 = np.sum(t_JH_2005)
s5_34
Out[907]:
4040
In [908]:
df_st_KN_2005 = df_2005.loc[(df_2005["State"]=="KARNATAKA")]

df_st_KN_2005
Out[908]:
State Year Type Gender Age_group Total
96688 KARNATAKA 2005 Bankruptcy or Sudden change in Economic Female 30-44 6
96689 KARNATAKA 2005 Cancer Male 60+ 3
96690 KARNATAKA 2005 Causes Not known Female 30-44 260
96691 KARNATAKA 2005 Divorce Female 45-59 0
96692 KARNATAKA 2005 Divorce Male 15-29 0
... ... ... ... ... ... ...
232652 KARNATAKA 2005 House Wife Female 15-29 816
232653 KARNATAKA 2005 Others Female 15-29 208
232654 KARNATAKA 2005 Professional Activity Female 0-14 2
232655 KARNATAKA 2005 Public Sector Undertaking Female 15-29 11
232656 KARNATAKA 2005 Public Sector Undertaking Male 15-29 57

566 rows × 6 columns

In [909]:
t_KN_2005 = df_st_KN_2005.loc[:,"Total"]

s5_35 = np.sum(t_KN_2005)
s5_35
Out[909]:
57785
In [910]:
df_st_KER_2005 = df_2005.loc[(df_2005["State"]=="KERALA")]

df_st_KER_2005
Out[910]:
State Year Type Gender Age_group Total
101613 KERALA 2005 Illegitimate Pregnancy Female 45-59 0
101614 KERALA 2005 Not having Children(Barrenness/Impotency Female 30-44 10
101615 KERALA 2005 Not having Children(Barrenness/Impotency Female 45-59 5
101616 KERALA 2005 Not having Children(Barrenness/Impotency Male 30-44 5
101617 KERALA 2005 Others Male 0-14 11
... ... ... ... ... ... ...
232844 KERALA 2005 By touching electric wires Male 60+ 2
232845 KERALA 2005 Professional Activity Male 45-59 48
232846 KERALA 2005 Service (Government) Male 45-59 36
232847 KERALA 2005 Service (Private) Female 30-44 14
232848 KERALA 2005 Widowed/Widower Female 0-100+ 150

566 rows × 6 columns

In [911]:
t_KER_2005 = df_st_KER_2005.loc[:,"Total"]

s5_36 = np.sum(t_KER_2005)
s5_36
Out[911]:
46220
In [912]:
df_st_LD_2005 = df_2005.loc[(df_2005["State"]=="LAKSHADWEEP")]

df_st_LD_2005
Out[912]:
State Year Type Gender Age_group Total
108052 LAKSHADWEEP 2005 Cancer Male 15-29 0
108053 LAKSHADWEEP 2005 Causes Not known Male 0-14 0
108054 LAKSHADWEEP 2005 Death of Dear Person Male 30-44 0
108055 LAKSHADWEEP 2005 Divorce Male 15-29 0
108056 LAKSHADWEEP 2005 Insanity/Mental Illness Male 60+ 0
... ... ... ... ... ... ...
233056 LAKSHADWEEP 2005 By Jumping from (Building) Female 0-14 0
233057 LAKSHADWEEP 2005 By Jumping from (Building) Male 45-59 0
233058 LAKSHADWEEP 2005 Others Female 60+ 0
233059 LAKSHADWEEP 2005 Service (Private) Male 0-14 0
233060 LAKSHADWEEP 2005 Seperated Female 0-100+ 0

556 rows × 6 columns

In [913]:
t_LD_2005 = df_st_LD_2005.loc[:,"Total"]

s5_37 = np.sum(t_LD_2005)
s5_37
Out[913]:
0
In [914]:
df_st_MP_2005 = df_2005.loc[(df_2005["State"]=="MADHYA PRADESH")]

df_st_MP_2005
Out[914]:
State Year Type Gender Age_group Total
114195 MADHYA PRADESH 2005 Bankruptcy or Sudden change in Economic Female 45-59 1
114196 MADHYA PRADESH 2005 Drug Abuse/Addiction Female 15-29 0
114197 MADHYA PRADESH 2005 Drug Abuse/Addiction Male 0-14 0
114198 MADHYA PRADESH 2005 Not having Children(Barrenness/Impotency Male 0-14 0
114199 MADHYA PRADESH 2005 Professional/Career Problem Male 60+ 0
... ... ... ... ... ... ...
233279 MADHYA PRADESH 2005 Graduate Male 0-100+ 49
233280 MADHYA PRADESH 2005 By Fire-Arms Female 15-29 2
233281 MADHYA PRADESH 2005 Others Male 0-14 6
233282 MADHYA PRADESH 2005 By touching electric wires Female 15-29 10
233283 MADHYA PRADESH 2005 Seperated Male 0-100+ 73

566 rows × 6 columns

In [915]:
t_MP_2005 = df_st_MP_2005.loc[:,"Total"]

s5_38 = np.sum(t_MP_2005)
s5_38
Out[915]:
27240
In [916]:
df_st_MH_2005 = df_2005.loc[(df_2005["State"]=="MAHARASHTRA")]

df_st_MH_2005
Out[916]:
State Year Type Gender Age_group Total
120898 MAHARASHTRA 2005 Bankruptcy or Sudden change in Economic Male 30-44 183
120899 MAHARASHTRA 2005 Cancer Male 60+ 16
120900 MAHARASHTRA 2005 Divorce Female 45-59 1
120901 MAHARASHTRA 2005 Divorce Male 30-44 7
120902 MAHARASHTRA 2005 Love Affairs Male 30-44 23
... ... ... ... ... ... ...
233509 MAHARASHTRA 2005 By Over Alcoholism Male 15-29 24
233510 MAHARASHTRA 2005 By touching electric wires Female 15-29 0
233511 MAHARASHTRA 2005 Self-employed (Business activity) Male 30-44 188
233512 MAHARASHTRA 2005 Service (Private) Male 45-59 340
233513 MAHARASHTRA 2005 Unemployed Male 30-44 368

566 rows × 6 columns

In [917]:
t_MH_2005 = df_st_MH_2005.loc[:,"Total"]

s5_39 = np.sum(t_MH_2005)
s5_39
Out[917]:
72130
In [918]:
df_st_MN_2005 = df_2005.loc[(df_2005["State"]=="MANIPUR")]

df_st_MN_2005
Out[918]:
State Year Type Gender Age_group Total
125231 MANIPUR 2005 Bankruptcy or Sudden change in Economic Female 45-59 0
125232 MANIPUR 2005 Dowry Dispute Male 15-29 0
125233 MANIPUR 2005 Family Problems Male 15-29 0
125234 MANIPUR 2005 Ideological Causes/Hero Worshipping Male 15-29 0
125235 MANIPUR 2005 Illness (Aids/STD) Female 15-29 0
... ... ... ... ... ... ...
233723 MANIPUR 2005 By touching electric wires Male 0-14 0
233724 MANIPUR 2005 Farming/Agriculture Activity Female 30-44 0
233725 MANIPUR 2005 Others Male 30-44 1
233726 MANIPUR 2005 Professional Activity Female 45-59 0
233727 MANIPUR 2005 Service (Government) Female 45-59 0

558 rows × 6 columns

In [919]:
t_MN_2005 = df_st_MN_2005.loc[:,"Total"]

s5_40 = np.sum(t_MN_2005)
s5_40
Out[919]:
134
In [920]:
df_st_MG_2005 = df_2005.loc[(df_2005["State"]=="MEGHALAYA")]

df_st_MG_2005
Out[920]:
State Year Type Gender Age_group Total
132655 MEGHALAYA 2005 Dowry Dispute Male 45-59 0
132656 MEGHALAYA 2005 Drug Abuse/Addiction Female 60+ 0
132657 MEGHALAYA 2005 Failure in Examination Male 60+ 0
132658 MEGHALAYA 2005 Fall in Social Reputation Male 30-44 0
132659 MEGHALAYA 2005 Illegitimate Pregnancy Male 0-14 0
... ... ... ... ... ... ...
233924 MEGHALAYA 2005 By Over Alcoholism Male 0-14 0
233925 MEGHALAYA 2005 By touching electric wires Male 0-14 0
233926 MEGHALAYA 2005 Farming/Agriculture Activity Female 30-44 0
233927 MEGHALAYA 2005 Others Male 45-59 5
233928 MEGHALAYA 2005 Service (Government) Female 45-59 0

561 rows × 6 columns

In [921]:
t_MG_2005 = df_st_MG_2005.loc[:,"Total"]

s5_41 = np.sum(t_MG_2005)
s5_41
Out[921]:
355
In [922]:
df_st_MZ_2005 = df_2005.loc[(df_2005["State"]=="MIZORAM")]

df_st_MZ_2005
Out[922]:
State Year Type Gender Age_group Total
137745 MIZORAM 2005 Death of Dear Person Female 60+ 0
137746 MIZORAM 2005 Death of Dear Person Male 30-44 0
137747 MIZORAM 2005 Divorce Male 15-29 0
137748 MIZORAM 2005 Family Problems Female 15-29 0
137749 MIZORAM 2005 Love Affairs Female 15-29 0
... ... ... ... ... ... ...
234116 MIZORAM 2005 By touching electric wires Female 60+ 0
234117 MIZORAM 2005 Others Male 15-29 0
234118 MIZORAM 2005 Self-employed (Business activity) Male 30-44 0
234119 MIZORAM 2005 Student Female 45-59 0
234120 MIZORAM 2005 Never Married Male 0-100+ 17

563 rows × 6 columns

In [923]:
t_MN_2005 = df_st_MN_2005.loc[:,"Total"]

s5_42 = np.sum(t_MN_2005)
s5_42
Out[923]:
134
In [924]:
df_st_NG_2005 = df_2005.loc[(df_2005["State"]=="NAGALAND")]

df_st_NG_2005
Out[924]:
State Year Type Gender Age_group Total
142302 NAGALAND 2005 Cancer Female 30-44 0
142303 NAGALAND 2005 Cancer Male 15-29 0
142358 NAGALAND 2005 Death of Dear Person Female 15-29 0
142359 NAGALAND 2005 Death of Dear Person Male 0-14 0
142360 NAGALAND 2005 Failure in Examination Male 30-44 0
... ... ... ... ... ... ...
234331 NAGALAND 2005 House Wife Female 15-29 0
234332 NAGALAND 2005 House Wife Female 60+ 0
234333 NAGALAND 2005 Others Male 45-59 0
234334 NAGALAND 2005 Service (Government) Female 60+ 0
234335 NAGALAND 2005 Unemployed Male 15-29 0

561 rows × 6 columns

In [925]:
t_NG_2005 = df_st_NG_2005.loc[:,"Total"]

s5_43 = np.sum(t_NG_2005)
s5_43
Out[925]:
135
In [926]:
df_st_OD_2005 = df_2005.loc[(df_2005["State"]=="ODISHA")]

df_st_OD_2005
Out[926]:
State Year Type Gender Age_group Total
147158 ODISHA 2005 Bankruptcy or Sudden change in Economic Male 60+ 1
147159 ODISHA 2005 Cancer Male 60+ 5
147160 ODISHA 2005 Death of Dear Person Male 15-29 0
147161 ODISHA 2005 Fall in Social Reputation Female 30-44 2
147162 ODISHA 2005 Love Affairs Female 15-29 74
... ... ... ... ... ... ...
234522 ODISHA 2005 By Overdose of sleeping pills Female 15-29 0
234523 ODISHA 2005 By touching electric wires Female 30-44 3
234524 ODISHA 2005 Others Female 15-29 82
234525 ODISHA 2005 Public Sector Undertaking Female 15-29 7
234526 ODISHA 2005 Self-employed (Business activity) Male 15-29 59

566 rows × 6 columns

In [927]:
t_OD_2005 = df_st_OD_2005.loc[:,"Total"]

s5_44 = np.sum(t_OD_2005)
s5_44
Out[927]:
21040
In [928]:
df_st_PD_2005 = df_2005.loc[(df_2005["State"]=="PUDUCHERRY")]

df_st_PD_2005
Out[928]:
State Year Type Gender Age_group Total
153407 PUDUCHERRY 2005 Bankruptcy or Sudden change in Economic Male 60+ 0
153408 PUDUCHERRY 2005 Causes Not known Male 30-44 7
153409 PUDUCHERRY 2005 Death of Dear Person Female 45-59 0
153410 PUDUCHERRY 2005 Illegitimate Pregnancy Male 30-44 0
153411 PUDUCHERRY 2005 Suspected/Illicit Relation Female 0-14 0
... ... ... ... ... ... ...
234752 PUDUCHERRY 2005 Others Female 30-44 0
234753 PUDUCHERRY 2005 Professional Activity Male 30-44 5
234754 PUDUCHERRY 2005 Public Sector Undertaking Male 45-59 0
234755 PUDUCHERRY 2005 Self-employed (Business activity) Male 15-29 2
234756 PUDUCHERRY 2005 Self-employed (Business activity) Male 60+ 2

559 rows × 6 columns

In [929]:
t_PD_2005 = df_st_PD_2005.loc[:,"Total"]

s5_45 = np.sum(t_PD_2005)
s5_45
Out[929]:
2690
In [930]:
df_st_PB_2005 = df_2005.loc[(df_2005["State"]=="PUNJAB")]

df_st_PB_2005
Out[930]:
State Year Type Gender Age_group Total
157870 PUNJAB 2005 Bankruptcy or Sudden change in Economic Female 0-14 0
157871 PUNJAB 2005 Cancellation/Non-Settlement of Marriage Female 60+ 0
157872 PUNJAB 2005 Family Problems Female 0-14 0
157873 PUNJAB 2005 Family Problems Female 15-29 12
157874 PUNJAB 2005 Physical Abuse (Rape/Incest Etc.) Female 30-44 0
... ... ... ... ... ... ...
234938 PUNJAB 2005 By Fire-Arms Female 15-29 2
234939 PUNJAB 2005 Farming/Agriculture Activity Male 15-29 24
234940 PUNJAB 2005 Professional Activity Male 30-44 4
234941 PUNJAB 2005 Unemployed Female 30-44 3
234942 PUNJAB 2005 Never Married Male 0-100+ 143

565 rows × 6 columns

In [931]:
t_PB_2005 = df_st_PB_2005.loc[:,"Total"]

s5_46 = np.sum(t_PB_2005)
s5_46
Out[931]:
2940
In [932]:
df_st_RJ_2005 = df_2005.loc[(df_2005["State"]=="RAJASTHAN")]

df_st_RJ_2005
Out[932]:
State Year Type Gender Age_group Total
164629 RAJASTHAN 2005 Fall in Social Reputation Male 45-59 0
164630 RAJASTHAN 2005 Insanity/Mental Illness Male 15-29 83
164631 RAJASTHAN 2005 Not having Children(Barrenness/Impotency Male 45-59 1
164632 RAJASTHAN 2005 By Consuming Other Poison Male 30-44 150
164633 RAJASTHAN 2005 By Jumping from (Building) Male 45-59 1
... ... ... ... ... ... ...
235145 RAJASTHAN 2005 By touching electric wires Male 60+ 0
235146 RAJASTHAN 2005 Others Male 15-29 292
235147 RAJASTHAN 2005 Self-employed (Business activity) Female 45-59 0
235148 RAJASTHAN 2005 Service (Private) Male 15-29 108
235149 RAJASTHAN 2005 Student Male 45-59 0

565 rows × 6 columns

In [933]:
t_RJ_2005 = df_st_RJ_2005.loc[:,"Total"]

s5_47 = np.sum(t_RJ_2005)
s5_47
Out[933]:
20889
In [934]:
df_st_SM_2005 = df_2005.loc[(df_2005["State"]=="SIKKIM")]

df_st_SM_2005
Out[934]:
State Year Type Gender Age_group Total
169279 SIKKIM 2005 Cancer Female 0-14 0
169280 SIKKIM 2005 Causes Not known Female 30-44 4
169281 SIKKIM 2005 Divorce Male 0-14 0
169282 SIKKIM 2005 Failure in Examination Male 15-29 0
169283 SIKKIM 2005 Fall in Social Reputation Male 60+ 0
... ... ... ... ... ... ...
235378 SIKKIM 2005 Professional Activity Male 60+ 0
235379 SIKKIM 2005 Public Sector Undertaking Male 30-44 0
235380 SIKKIM 2005 Self-employed (Business activity) Male 15-29 0
235381 SIKKIM 2005 Self-employed (Business activity) Male 60+ 0
235382 SIKKIM 2005 Student Female 45-59 0

562 rows × 6 columns

In [935]:
t_SM_2005 = df_st_SM_2005.loc[:,"Total"]

s5_48 = np.sum(t_SM_2005)
s5_48
Out[935]:
545
In [936]:
df_st_TN_2005 = df_2005.loc[(df_2005["State"]=="TAMIL NADU")]

df_st_TN_2005
Out[936]:
State Year Type Gender Age_group Total
175057 TAMIL NADU 2005 Bankruptcy or Sudden change in Economic Female 30-44 8
175058 TAMIL NADU 2005 Bankruptcy or Sudden change in Economic Female 45-59 9
175059 TAMIL NADU 2005 Cancellation/Non-Settlement of Marriage Male 45-59 10
175060 TAMIL NADU 2005 Cancer Female 60+ 0
175061 TAMIL NADU 2005 Causes Not known Female 0-14 21
... ... ... ... ... ... ...
235594 TAMIL NADU 2005 By touching electric wires Female 0-14 1
235595 TAMIL NADU 2005 By touching electric wires Female 15-29 10
235596 TAMIL NADU 2005 House Wife Female 15-29 647
235597 TAMIL NADU 2005 Others Female 60+ 36
235598 TAMIL NADU 2005 Public Sector Undertaking Male 60+ 10

566 rows × 6 columns

In [937]:
t_TN_2005 = df_st_TN_2005.loc[:,"Total"]

s5_49 = np.sum(t_TN_2005)
s5_49
Out[937]:
60380
In [938]:
df_st_TP_2005 = df_2005.loc[(df_2005["State"]=="TRIPURA")]

df_st_TP_2005
Out[938]:
State Year Type Gender Age_group Total
181262 TRIPURA 2005 Dowry Dispute Female 30-44 19
181263 TRIPURA 2005 Fall in Social Reputation Female 60+ 0
181264 TRIPURA 2005 Other Prolonged Illness Female 45-59 3
181265 TRIPURA 2005 Other Prolonged Illness Male 30-44 9
181266 TRIPURA 2005 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
... ... ... ... ... ... ...
235820 TRIPURA 2005 By Machine Female 30-44 0
235821 TRIPURA 2005 By Over Alcoholism Male 30-44 0
235822 TRIPURA 2005 Farming/Agriculture Activity Male 0-14 0
235823 TRIPURA 2005 Student Female 15-29 28
235824 TRIPURA 2005 Student Female 60+ 0

566 rows × 6 columns

In [939]:
t_TP_2005 = df_st_TP_2005.loc[:,"Total"]

s5_50 = np.sum(t_TP_2005)
s5_50
Out[939]:
3575
In [940]:
df_st_UP_2005 = df_2005.loc[(df_2005["State"]=="UTTAR PRADESH")]

df_st_UP_2005
Out[940]:
State Year Type Gender Age_group Total
185595 UTTAR PRADESH 2005 Bankruptcy or Sudden change in Economic Female 30-44 11
185596 UTTAR PRADESH 2005 Ideological Causes/Hero Worshipping Female 15-29 0
185597 UTTAR PRADESH 2005 Others Male 0-14 8
185598 UTTAR PRADESH 2005 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
185599 UTTAR PRADESH 2005 Property Dispute Male 60+ 1
... ... ... ... ... ... ...
236001 UTTAR PRADESH 2005 By touching electric wires Male 60+ 8
236002 UTTAR PRADESH 2005 Farming/Agriculture Activity Male 30-44 164
236003 UTTAR PRADESH 2005 Public Sector Undertaking Male 0-14 0
236004 UTTAR PRADESH 2005 Service (Government) Female 45-59 2
236005 UTTAR PRADESH 2005 Unemployed Male 60+ 7

566 rows × 6 columns

In [941]:
t_UP_2005 = df_st_UP_2005.loc[:,"Total"]

s5_51 = np.sum(t_UP_2005)
s5_51
Out[941]:
17245
In [942]:
df_st_UK_2005 = df_2005.loc[(df_2005["State"]=="UTTARAKHAND")]

df_st_UK_2005
Out[942]:
State Year Type Gender Age_group Total
190617 UTTARAKHAND 2005 Cancellation/Non-Settlement of Marriage Female 45-59 0
190618 UTTARAKHAND 2005 Divorce Male 60+ 0
190619 UTTARAKHAND 2005 Drug Abuse/Addiction Female 45-59 0
190620 UTTARAKHAND 2005 Failure in Examination Male 0-14 0
190621 UTTARAKHAND 2005 Other Prolonged Illness Male 30-44 1
... ... ... ... ... ... ...
236219 UTTARAKHAND 2005 Professional/Career Problem Female 45-59 0
236220 UTTARAKHAND 2005 Post Graduate and Above Male 0-100+ 1
236221 UTTARAKHAND 2005 By Jumping from (Building) Female 45-59 0
236222 UTTARAKHAND 2005 By Jumping off Moving Vehicles/Trains Male 45-59 0
236223 UTTARAKHAND 2005 Service (Private) Female 0-14 0

564 rows × 6 columns

In [943]:
t_UK_2005 = df_st_UK_2005.loc[:,"Total"]

s5_52 = np.sum(t_UK_2005)
s5_52
Out[943]:
1365
In [944]:
df_st_WB_2005 = df_2005.loc[(df_2005["State"]=="WEST BENGAL")]

df_st_WB_2005
Out[944]:
State Year Type Gender Age_group Total
196851 WEST BENGAL 2005 Death of Dear Person Male 45-59 9
196852 WEST BENGAL 2005 Divorce Male 60+ 0
196853 WEST BENGAL 2005 Failure in Examination Male 60+ 0
196854 WEST BENGAL 2005 Others Female 30-44 386
196855 WEST BENGAL 2005 Other Prolonged Illness Female 0-14 0
... ... ... ... ... ... ...
236460 WEST BENGAL 2005 Others Female 60+ 42
236461 WEST BENGAL 2005 Others Male 45-59 296
236462 WEST BENGAL 2005 Retired Person Female 45-59 0
236463 WEST BENGAL 2005 Self-employed (Business activity) Male 30-44 351
236464 WEST BENGAL 2005 Service (Private) Male 45-59 237

566 rows × 6 columns

In [945]:
t_WB_2005 = df_st_WB_2005.loc[:,"Total"]

s5_53 = np.sum(t_WB_2005)
s5_53
Out[945]:
75075
In [946]:
t_ANm_2005 = np.sum(df_st_AN_2005.where(df_st_AN_2005["Gender"]=="Male")["Total"])
t_ANm_2005
Out[946]:
430.0
In [947]:
t_ANfm_2005 = np.sum(df_st_AN_2005.where(df_st_AN_2005["Gender"]=="Female")["Total"])
t_ANfm_2005
Out[947]:
265.0
In [948]:
t_APm_2005 = np.sum(df_st_AP_2005.where(df_st_AP_2005["Gender"]=="Male")["Total"])
t_APm_2005
Out[948]:
44325.0
In [949]:
t_APfm_2005 = np.sum(df_st_AP_2005.where(df_st_AP_2005["Gender"]=="Female")["Total"])
t_APfm_2005
Out[949]:
22885.0
In [950]:
t_ARPm_2005 = np.sum(df_st_ARP_2005.where(df_st_ARP_2005["Gender"]=="Male")["Total"])
t_ARPm_2005
Out[950]:
245.0
In [951]:
t_ARPfm_2005 = np.sum(df_st_ARP_2005.where(df_st_ARP_2005["Gender"]=="Female")["Total"])
t_ARPfm_2005
Out[951]:
105.0
In [952]:
t_ASm_2005 = np.sum(df_st_AS_2005.where(df_st_AS_2005["Gender"]=="Male")["Total"])
t_ASm_2005
Out[952]:
9734.0
In [953]:
t_ASfm_2005 = np.sum(df_st_AS_2005.where(df_st_AS_2005["Gender"]=="Female")["Total"])
t_ASfm_2005
Out[953]:
4475.0
In [954]:
t_BHm_2005 = np.sum(df_st_BH_2005.where(df_st_BH_2005["Gender"]=="Male")["Total"])
t_BHm_2005
Out[954]:
1635.0
In [955]:
t_BHfm_2005 = np.sum(df_st_BH_2005.where(df_st_BH_2005["Gender"]=="Female")["Total"])
t_BHfm_2005
Out[955]:
1080.0
In [956]:
t_CHm_2005 = np.sum(df_st_CH_2005.where(df_st_CH_2005["Gender"]=="Male")["Total"])
t_CHm_2005
Out[956]:
315.0
In [957]:
t_CHfm_2005 = np.sum(df_st_CH_2005.where(df_st_CH_2005["Gender"]=="Female")["Total"])
t_CHfm_2005
Out[957]:
130.0
In [958]:
t_CTm_2005 = np.sum(df_st_CT_2005.where(df_st_CT_2005["Gender"]=="Male")["Total"])
t_CTm_2005
Out[958]:
16525.0
In [959]:
t_CTfm_2005 = np.sum(df_st_CT_2005.where(df_st_CT_2005["Gender"]=="Female")["Total"])
t_CTfm_2005
Out[959]:
7880.0
In [960]:
t_DNm_2005 = np.sum(df_st_DN_2005.where(df_st_DN_2005["Gender"]=="Male")["Total"])
t_DNm_2005
Out[960]:
205.0
In [961]:
t_DNfm_2005 = np.sum(df_st_DN_2005.where(df_st_DN_2005["Gender"]=="Female")["Total"])
t_DNfm_2005
Out[961]:
140.0
In [962]:
t_DDm_2005 = np.sum(df_st_DD_2005.where(df_st_DD_2005["Gender"]=="Male")["Total"])
t_DDm_2005
Out[962]:
124.0
In [963]:
t_DDfm_2005 = np.sum(df_st_DD_2005.where(df_st_DD_2005["Gender"]=="Female")["Total"])
t_DDfm_2005
Out[963]:
35.0
In [964]:
t_DLm_2005 = np.sum(df_st_DL_2005.where(df_st_DL_2005["Gender"]=="Male")["Total"])
t_DLm_2005
Out[964]:
3885.0
In [965]:
t_DLfm_2005 = np.sum(df_st_DL_2005.where(df_st_DL_2005["Gender"]=="Female")["Total"])
t_DLfm_2005
Out[965]:
2339.0
In [966]:
t_GOAm_2005 = np.sum(df_st_GOA_2005.where(df_st_GOA_2005["Gender"]=="Male")["Total"])
t_GOAm_2005
Out[966]:
985.0
In [967]:
t_GOAfm_2005 = np.sum(df_st_GOA_2005.where(df_st_GOA_2005["Gender"]=="Female")["Total"])
t_GOAfm_2005
Out[967]:
425.0
In [968]:
t_GJm_2005 = np.sum(df_st_GJ_2005.where(df_st_GJ_2005["Gender"]=="Male")["Total"])
t_GJm_2005
Out[968]:
14510.0
In [969]:
t_GJfm_2005 = np.sum(df_st_GJ_2005.where(df_st_GJ_2005["Gender"]=="Female")["Total"])
t_GJfm_2005
Out[969]:
9315.0
In [970]:
t_HRm_2005 = np.sum(df_st_HR_2005.where(df_st_HR_2005["Gender"]=="Male")["Total"])
t_HRm_2005
Out[970]:
7465.0
In [971]:
t_HRfm_2005 = np.sum(df_st_HR_2005.where(df_st_HR_2005["Gender"]=="Female")["Total"])
t_HRfm_2005
Out[971]:
2765.0
In [972]:
t_HPm_2005 = np.sum(df_st_HP_2005.where(df_st_HP_2005["Gender"]=="Male")["Total"])
t_HPm_2005
Out[972]:
1070.0
In [973]:
t_HPfm_2005 = np.sum(df_st_HP_2005.where(df_st_HP_2005["Gender"]=="Female")["Total"])
t_HPfm_2005
Out[973]:
725.0
In [974]:
t_JKm_2005 = np.sum(df_st_JK_2005.where(df_st_JK_2005["Gender"]=="Male")["Total"])
t_JKm_2005
Out[974]:
980.0
In [975]:
t_JKfm_2005 = np.sum(df_st_JK_2005.where(df_st_JK_2005["Gender"]=="Female")["Total"])
t_JKfm_2005
Out[975]:
490.0
In [976]:
t_JHm_2005 = np.sum(df_st_JH_2005.where(df_st_JH_2005["Gender"]=="Male")["Total"])
t_JHm_2005
Out[976]:
2615.0
In [977]:
t_JHfm_2005 = np.sum(df_st_JH_2005.where(df_st_JH_2005["Gender"]=="Female")["Total"])
t_JHfm_2005
Out[977]:
1425.0
In [978]:
t_KNm_2005 = np.sum(df_st_KN_2005.where(df_st_KN_2005["Gender"]=="Male")["Total"])
t_KNm_2005
Out[978]:
38535.0
In [979]:
t_KNfm_2005 = np.sum(df_st_KN_2005.where(df_st_KN_2005["Gender"]=="Female")["Total"])
t_KNfm_2005
Out[979]:
19250.0
In [980]:
t_KERm_2005 = np.sum(df_st_KER_2005.where(df_st_KER_2005["Gender"]=="Male")["Total"])
t_KERm_2005
Out[980]:
34150.0
In [981]:
t_KERfm_2005 = np.sum(df_st_KER_2005.where(df_st_KER_2005["Gender"]=="Female")["Total"])
t_KERfm_2005
Out[981]:
12070.0
In [982]:
t_LDm_2005 = np.sum(df_st_LD_2005.where(df_st_LD_2005["Gender"]=="Male")["Total"])
t_LDm_2005
Out[982]:
0.0
In [983]:
t_LDfm_2005 = np.sum(df_st_LD_2005.where(df_st_LD_2005["Gender"]=="Female")["Total"])
t_LDfm_2005
Out[983]:
0.0
In [984]:
t_MPm_2005 = np.sum(df_st_MP_2005.where(df_st_MP_2005["Gender"]=="Male")["Total"])
t_MPm_2005
Out[984]:
14255.0
In [985]:
t_MPfm_2005 = np.sum(df_st_MP_2005.where(df_st_MP_2005["Gender"]=="Female")["Total"])
t_MPfm_2005
Out[985]:
12985.0
In [986]:
t_MHm_2005 = np.sum(df_st_MH_2005.where(df_st_MH_2005["Gender"]=="Male")["Total"])
t_MHm_2005
Out[986]:
48015.0
In [987]:
t_MHfm_2005 = np.sum(df_st_MH_2005.where(df_st_MH_2005["Gender"]=="Female")["Total"])
t_MHfm_2005
Out[987]:
24115.0
In [988]:
t_MNm_2005 = np.sum(df_st_MN_2005.where(df_st_MN_2005["Gender"]=="Male")["Total"])
t_MNm_2005
Out[988]:
114.0
In [989]:
t_MNfm_2005 = np.sum(df_st_MN_2005.where(df_st_MN_2005["Gender"]=="Female")["Total"])
t_MNfm_2005
Out[989]:
20.0
In [990]:
t_MGm_2005 = np.sum(df_st_MG_2005.where(df_st_MG_2005["Gender"]=="Male")["Total"])
t_MGm_2005
Out[990]:
250.0
In [991]:
t_MGfm_2005 = np.sum(df_st_MG_2005.where(df_st_MG_2005["Gender"]=="Female")["Total"])
t_MGfm_2005
Out[991]:
105.0
In [992]:
t_MZm_2005 = np.sum(df_st_MZ_2005.where(df_st_MZ_2005["Gender"]=="Male")["Total"])
t_MZm_2005
Out[992]:
235.0
In [993]:
t_MZfm_2005 = np.sum(df_st_MZ_2005.where(df_st_MZ_2005["Gender"]=="Female")["Total"])
t_MZfm_2005
Out[993]:
40.0
In [994]:
t_NGm_2005 = np.sum(df_st_NG_2005.where(df_st_NG_2005["Gender"]=="Male")["Total"])
t_NGm_2005
Out[994]:
105.0
In [995]:
t_NGfm_2005 = np.sum(df_st_NG_2005.where(df_st_NG_2005["Gender"]=="Female")["Total"])
t_MGfm_2005
Out[995]:
105.0
In [996]:
t_ODm_2005 = np.sum(df_st_OD_2005.where(df_st_OD_2005["Gender"]=="Male")["Total"])
t_ODm_2005
Out[996]:
12770.0
In [997]:
t_ODfm_2005 = np.sum(df_st_OD_2005.where(df_st_OD_2005["Gender"]=="Female")["Total"])
t_ODfm_2005
Out[997]:
8270.0
In [998]:
t_PDm_2005 = np.sum(df_st_PD_2005.where(df_st_PD_2005["Gender"]=="Male")["Total"])
t_PDm_2005
Out[998]:
1700.0
In [999]:
t_PDfm_2005 = np.sum(df_st_PD_2005.where(df_st_PD_2005["Gender"]=="Female")["Total"])
t_PDfm_2005
Out[999]:
990.0
In [1000]:
t_PBm_2005 = np.sum(df_st_PB_2005.where(df_st_PB_2005["Gender"]=="Male")["Total"])
t_PBm_2005
Out[1000]:
2410.0
In [1001]:
t_PBfm_2005 = np.sum(df_st_PB_2005.where(df_st_PB_2005["Gender"]=="Female")["Total"])
t_PBfm_2005
Out[1001]:
530.0
In [1002]:
t_RJm_2005 = np.sum(df_st_RJ_2005.where(df_st_RJ_2005["Gender"]=="Male")["Total"])
t_RJm_2005
Out[1002]:
14290.0
In [1003]:
t_RJfm_2005 = np.sum(df_st_RJ_2005.where(df_st_RJ_2005["Gender"]=="Female")["Total"])
t_RJfm_2005
Out[1003]:
6599.0
In [1004]:
t_SMm_2005 = np.sum(df_st_SM_2005.where(df_st_SM_2005["Gender"]=="Male")["Total"])
t_SMm_2005
Out[1004]:
310.0
In [1005]:
t_SMfm_2005 = np.sum(df_st_SM_2005.where(df_st_SM_2005["Gender"]=="Female")["Total"])
t_SMfm_2005
Out[1005]:
235.0
In [1006]:
t_TNm_2005 = np.sum(df_st_TN_2005.where(df_st_TN_2005["Gender"]=="Male")["Total"])
t_TNm_2005
Out[1006]:
37535.0
In [1007]:
t_TNfm_2005 = np.sum(df_st_TN_2005.where(df_st_TN_2005["Gender"]=="Female")["Total"])
t_TNfm_2005
Out[1007]:
22845.0
In [1008]:
t_TPm_2005 = np.sum(df_st_TP_2005.where(df_st_TP_2005["Gender"]=="Male")["Total"])
t_TPm_2005
Out[1008]:
2005.0
In [1009]:
t_TPfm_2005 = np.sum(df_st_TP_2005.where(df_st_TP_2005["Gender"]=="Female")["Total"])
t_TPfm_2005
Out[1009]:
1570.0
In [1010]:
t_UPm_2005 = np.sum(df_st_UP_2005.where(df_st_UP_2005["Gender"]=="Male")["Total"])
t_UPm_2005
Out[1010]:
8860.0
In [1011]:
t_UPfm_2005 = np.sum(df_st_UP_2005.where(df_st_UP_2005["Gender"]=="Female")["Total"])
t_UPfm_2005
Out[1011]:
8385.0
In [1012]:
t_UKm_2005 = np.sum(df_st_UK_2005.where(df_st_UK_2005["Gender"]=="Male")["Total"])
t_UKm_2005
Out[1012]:
900.0
In [1013]:
t_UKfm_2005 = np.sum(df_st_UK_2005.where(df_st_UK_2005["Gender"]=="Female")["Total"])
t_UKfm_2005
Out[1013]:
465.0
In [1014]:
t_WBm_2005 = np.sum(df_st_WB_2005.where(df_st_WB_2005["Gender"]=="Male")["Total"])
t_WBm_2005
Out[1014]:
43070.0
In [1015]:
t_WBfm_2005 = np.sum(df_st_WB_2005.where(df_st_WB_2005["Gender"]=="Female")["Total"])
t_WBfm_2005
Out[1015]:
32005.0
In [1016]:
l_2005=list(df_2005.loc[:,"Type"].unique())
l_2005.sort()
print(l_2005,end=" ")
['Bankruptcy or Sudden change in Economic', 'By Consuming Insecticides', 'By Consuming Other Poison', 'By Drowning', 'By Fire-Arms', 'By Fire/Self Immolation', 'By Hanging', 'By Jumping from (Building)', 'By Jumping from (Other sites)', 'By Jumping off Moving Vehicles/Trains', 'By Machine', 'By Over Alcoholism', 'By Overdose of sleeping pills', 'By Self Infliction of injury', 'By coming under running vehicles/trains', 'By touching electric wires', 'Cancellation/Non-Settlement of Marriage', 'Cancer', 'Causes Not known', 'Death of Dear Person', 'Diploma', 'Divorce', 'Divorcee', 'Dowry Dispute', 'Drug Abuse/Addiction', 'Failure in Examination', 'Fall in Social Reputation', 'Family Problems', 'Farming/Agriculture Activity', 'Graduate', 'House Wife', 'Hr. Secondary/Intermediate/Pre-Universit', 'Ideological Causes/Hero Worshipping', 'Illegitimate Pregnancy', 'Illness (Aids/STD)', 'Insanity/Mental Illness', 'Love Affairs', 'Married', 'Matriculate/Secondary', 'Middle', 'Never Married', 'No Education', 'Not having Children(Barrenness/Impotency', 'Other Prolonged Illness', 'Others', 'Paralysis', 'Physical Abuse (Rape/Incest Etc.)', 'Post Graduate and Above', 'Poverty', 'Primary', 'Professional Activity', 'Professional/Career Problem', 'Property Dispute', 'Public Sector Undertaking', 'Retired Person', 'Self-employed (Business activity)', 'Seperated', 'Service (Government)', 'Service (Private)', 'Student', 'Suspected/Illicit Relation', 'Unemployed', 'Unemployment', 'Widowed/Widower'] 
In [1017]:
cause_l_2005=[]
for i in l_2005:
    rough= np.sum(df_2005.where(df_2005["Type"]==i)["Total"])
    cause_l_2005.append(rough)

print(cause_l_2005,end=" ")
[3095.0, 22316.0, 19102.0, 7783.0, 752.0, 8978.0, 36559.0, 546.0, 432.0, 741.0, 85.0, 1050.0, 828.0, 259.0, 3042.0, 1053.0, 957.0, 748.0, 17445.0, 820.0, 1063.0, 317.0, 1121.0, 2351.0, 2032.0, 2283.0, 1572.0, 25441.0, 17131.0, 2034.0, 24141.0, 8401.0, 215.0, 171.0, 1099.0, 7604.0, 3496.0, 80671.0, 19124.0, 27318.0, 23910.0, 26234.0, 775.0, 14820.0, 65985.0, 790.0, 202.0, 406.0, 2548.0, 29334.0, 2723.0, 735.0, 1559.0, 2143.0, 914.0, 6244.0, 3141.0, 1693.0, 8814.0, 5138.0, 1220.0, 8798.0, 2172.0, 5071.0] 
In [1018]:
x1_2005 = set(df_2005.loc[:,"State"])
x1_2005
len(x1_2005)
Out[1018]:
35
In [1019]:
cause_df_2005 = pd.DataFrame(cause_l_2005,l_2005)
cause_df_2005.reset_index()
Out[1019]:
index 0
0 Bankruptcy or Sudden change in Economic 3095.0
1 By Consuming Insecticides 22316.0
2 By Consuming Other Poison 19102.0
3 By Drowning 7783.0
4 By Fire-Arms 752.0
... ... ...
59 Student 5138.0
60 Suspected/Illicit Relation 1220.0
61 Unemployed 8798.0
62 Unemployment 2172.0
63 Widowed/Widower 5071.0

64 rows × 2 columns

In [1020]:
cause_df_2005.plot.bar(stacked=True,figsize=(50,20))
plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("Causes",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths due to Different Causes in 2005",fontsize=55)
plt.legend(["Death Count"], prop={"size":30})
Out[1020]:
<matplotlib.legend.Legend at 0x1256598>
In [1021]:
s_2005=list(df_2005.loc[:,"State"].unique())
s_2005.sort()
print(s_2005,end=" ")
['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH', 'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR', 'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA', 'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA', 'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'] 
In [1022]:
state_s_2005 = [s5_19,s5_20,s5_21,s5_22,s5_23,s5_24,s5_25,s5_26,s5_27,s5_28,s5_29,s5_30,s5_31,s5_32,s5_33,s5_34,
           s5_35,s5_36,s5_37,s5_38,s5_39,s5_40,s5_41,s5_42,s5_43,s5_44,s5_45,s5_46,s5_47,s5_48,s5_49,s5_50,
           s5_51,s5_52,s5_53]
print(state_s_2005,end=" ")
[695, 67210, 350, 14209, 2715, 445, 24405, 345, 159, 6224, 1410, 23825, 10230, 1795, 1470, 4040, 57785, 46220, 0, 27240, 72130, 134, 355, 134, 135, 21040, 2690, 2940, 20889, 545, 60380, 3575, 17245, 1365, 75075] 
In [1023]:
state_m_2005=[t_ANm_2005, t_APm_2005, t_ARPm_2005, t_ASm_2005, t_BHm_2005, t_CHm_2005, t_CTm_2005, t_DNm_2005,
             t_DDm_2005, t_DLm_2005, t_GOAm_2005, t_GJm_2005, t_HRm_2005, t_HPm_2005,t_JKm_2005, t_JHm_2005,
             t_KNm_2005, t_KERm_2005, t_LDm_2005,t_MPm_2005,t_MHm_2005,t_MNm_2005,t_MGm_2005,t_MZm_2005,
             t_NGm_2005, t_ODm_2005, t_PDm_2005,t_PBm_2005,t_RJm_2005,t_SMm_2005,t_TNm_2005,t_TPm_2005,
             t_UPm_2005, t_UKm_2005, t_WBm_2005]
print(state_m_2005,end=" ")
[430.0, 44325.0, 245.0, 9734.0, 1635.0, 315.0, 16525.0, 205.0, 124.0, 3885.0, 985.0, 14510.0, 7465.0, 1070.0, 980.0, 2615.0, 38535.0, 34150.0, 0.0, 14255.0, 48015.0, 114.0, 250.0, 235.0, 105.0, 12770.0, 1700.0, 2410.0, 14290.0, 310.0, 37535.0, 2005.0, 8860.0, 900.0, 43070.0] 
In [1024]:
state_fm_2005=[t_ANfm_2005, t_APfm_2005, t_ARPfm_2005, t_ASfm_2005, t_BHfm_2005, t_CHfm_2005, t_CTfm_2005, t_DNfm_2005,
             t_DDfm_2005, t_DLfm_2005, t_GOAfm_2005, t_GJfm_2005, t_HRfm_2005, t_HPfm_2005,t_JKfm_2005, t_JHfm_2005,
             t_KNfm_2005, t_KERfm_2005, t_LDfm_2005,t_MPfm_2005,t_MHfm_2005,t_MNfm_2005,t_MGfm_2005,t_MZfm_2005,
             t_NGfm_2005, t_ODfm_2005, t_PDfm_2005,t_PBfm_2005,t_RJfm_2005,t_SMfm_2005,t_TNfm_2005,t_TPfm_2005,
             t_UPfm_2005, t_UKfm_2005, t_WBfm_2005]
print(state_fm_2005,end=" ")
[265.0, 22885.0, 105.0, 4475.0, 1080.0, 130.0, 7880.0, 140.0, 35.0, 2339.0, 425.0, 9315.0, 2765.0, 725.0, 490.0, 1425.0, 19250.0, 12070.0, 0.0, 12985.0, 24115.0, 20.0, 105.0, 40.0, 30.0, 8270.0, 990.0, 530.0, 6599.0, 235.0, 22845.0, 1570.0, 8385.0, 465.0, 32005.0] 
In [1025]:
df_state_2005 = {
    
    "State":['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH',
             'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR',
             'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA',
             'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA',
             'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'],
                   
    "Total":[s5_19,s5_20,s5_21,s5_22,s5_23,s5_24,s5_25,s5_26,s5_27,s5_28,s5_29,s5_30,s5_31,s5_32,s5_33,s5_34,
           s5_35,s5_36,s5_37,s5_38,s5_39,s5_40,s5_41,s5_42,s5_43,s5_44,s5_45,s5_46,s5_47,s5_48,s5_49,s5_50,
           s5_51,s5_52,s5_53],
       
    "Male":[t_ANm_2005, t_APm_2005, t_ARPm_2005, t_ASm_2005, t_BHm_2005, t_CHm_2005, t_CTm_2005, t_DNm_2005,
             t_DDm_2005, t_DLm_2005, t_GOAm_2005, t_GJm_2005, t_HRm_2005, t_HPm_2005,t_JKm_2005, t_JHm_2005,
             t_KNm_2005, t_KERm_2005, t_LDm_2005,t_MPm_2005,t_MHm_2005,t_MNm_2005,t_MGm_2005,t_MZm_2005,
             t_NGm_2005, t_ODm_2005, t_PDm_2005,t_PBm_2005,t_RJm_2005,t_SMm_2005,t_TNm_2005,t_TPm_2005,
             t_UPm_2005, t_UKm_2005, t_WBm_2005],
                 
    "Female":[t_ANfm_2005, t_APfm_2005, t_ARPfm_2005, t_ASfm_2005, t_BHfm_2005, t_CHfm_2005, t_CTfm_2005, t_DNfm_2005,
             t_DDfm_2005, t_DLfm_2005, t_GOAfm_2005, t_GJfm_2005, t_HRfm_2005, t_HPfm_2005,t_JKfm_2005, t_JHfm_2005,
             t_KNfm_2005, t_KERfm_2005, t_LDfm_2005,t_MPfm_2005,t_MHfm_2005,t_MNfm_2005,t_MGfm_2005,t_MZfm_2005,
             t_NGfm_2005, t_ODfm_2005, t_PDfm_2005,t_PBfm_2005,t_RJfm_2005,t_SMfm_2005,t_TNfm_2005,t_TPfm_2005,
             t_UPfm_2005, t_UKfm_2005, t_WBfm_2005]
                  

}

df_All_st_2005 = pd.DataFrame(df_state_2005)
df_All_st_2005
Out[1025]:
State Total Male Female
0 A & N ISLANDS 695 430.0 265.0
1 ANDHRA PRADESH 67210 44325.0 22885.0
2 ARUNACHAL PRADESH 350 245.0 105.0
3 ASSAM 14209 9734.0 4475.0
4 BIHAR 2715 1635.0 1080.0
5 CHANDIGARH 445 315.0 130.0
6 CHHATTISGARH 24405 16525.0 7880.0
7 D & N HAVELI 345 205.0 140.0
8 DAMAN & DIU 159 124.0 35.0
9 DELHI (UT) 6224 3885.0 2339.0
10 GOA 1410 985.0 425.0
11 GUJARAT 23825 14510.0 9315.0
12 HARYANA 10230 7465.0 2765.0
13 HIMACHAL PRADESH 1795 1070.0 725.0
14 JAMMU & KASHMIR 1470 980.0 490.0
15 JHARKHAND 4040 2615.0 1425.0
16 KARNATAKA 57785 38535.0 19250.0
17 KERALA 46220 34150.0 12070.0
18 LAKSHADWEEP 0 0.0 0.0
19 MADHYA PRADESH 27240 14255.0 12985.0
20 MAHARASHTRA 72130 48015.0 24115.0
21 MANIPUR 134 114.0 20.0
22 MEGHALAYA 355 250.0 105.0
23 MIZORAM 134 235.0 40.0
24 NAGALAND 135 105.0 30.0
25 ODISHA 21040 12770.0 8270.0
26 PUDUCHERRY 2690 1700.0 990.0
27 PUNJAB 2940 2410.0 530.0
28 RAJASTHAN 20889 14290.0 6599.0
29 SIKKIM 545 310.0 235.0
30 TAMIL NADU 60380 37535.0 22845.0
31 TRIPURA 3575 2005.0 1570.0
32 UTTAR PRADESH 17245 8860.0 8385.0
33 UTTARAKHAND 1365 900.0 465.0
34 WEST BENGAL 75075 43070.0 32005.0
In [1026]:
pivot_2005 = pd.pivot_table(df_All_st_2005, values=None, index='State', columns=None,
                       fill_value=None, margins=False, dropna=True, margins_name='All', observed=False)

pivot_2005
Out[1026]:
Female Male Total
State
A & N ISLANDS 265.0 430.0 695
ANDHRA PRADESH 22885.0 44325.0 67210
ARUNACHAL PRADESH 105.0 245.0 350
ASSAM 4475.0 9734.0 14209
BIHAR 1080.0 1635.0 2715
CHANDIGARH 130.0 315.0 445
CHHATTISGARH 7880.0 16525.0 24405
D & N HAVELI 140.0 205.0 345
DAMAN & DIU 35.0 124.0 159
DELHI (UT) 2339.0 3885.0 6224
GOA 425.0 985.0 1410
GUJARAT 9315.0 14510.0 23825
HARYANA 2765.0 7465.0 10230
HIMACHAL PRADESH 725.0 1070.0 1795
JAMMU & KASHMIR 490.0 980.0 1470
JHARKHAND 1425.0 2615.0 4040
KARNATAKA 19250.0 38535.0 57785
KERALA 12070.0 34150.0 46220
LAKSHADWEEP 0.0 0.0 0
MADHYA PRADESH 12985.0 14255.0 27240
MAHARASHTRA 24115.0 48015.0 72130
MANIPUR 20.0 114.0 134
MEGHALAYA 105.0 250.0 355
MIZORAM 40.0 235.0 134
NAGALAND 30.0 105.0 135
ODISHA 8270.0 12770.0 21040
PUDUCHERRY 990.0 1700.0 2690
PUNJAB 530.0 2410.0 2940
RAJASTHAN 6599.0 14290.0 20889
SIKKIM 235.0 310.0 545
TAMIL NADU 22845.0 37535.0 60380
TRIPURA 1570.0 2005.0 3575
UTTAR PRADESH 8385.0 8860.0 17245
UTTARAKHAND 465.0 900.0 1365
WEST BENGAL 32005.0 43070.0 75075
In [1027]:
pivot_2005.plot(kind='bar',figsize=(60,30))

plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("States",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths of Males And Females In Different State",fontsize=55)
plt.legend(["Female","Male","Total"], prop={"size":30})

plt.show
Out[1027]:
<function matplotlib.pyplot.show(close=None, block=None)>
In [1028]:
cause_l_percent_2005=[]
for i in cause_l_2005:
    p=i/np.sum(cause_l_2005)
    avg_2005_cause=p*100
    cause_l_percent_2005.append(avg_2005_cause)

print(cause_l_percent_2005,end=" ")
[0.5434162357671474, 3.918215417570166, 3.3539053103793375, 1.366529422609276, 0.1320352210975428, 1.5763460306033765, 6.4189835746078, 0.0958659982968861, 0.0758500206305033, 0.13010385483148829, 0.014924193874057363, 0.1843576890324733, 0.14537920620846465, 0.04547489662801008, 0.534110561939794, 0.18488442528685178, 0.16802886514673993, 0.13133290609170478, 3.062971319210949, 0.14397457619678866, 0.18664021280144677, 0.055658464212660984, 0.19682378038609769, 0.41278564468128065, 0.3567760229657007, 0.4008462895820348, 0.27600979729433145, 4.466899015881099, 3.0078395912526665, 0.3571271804686197, 4.23864663898375, 1.4750370910112458, 0.037749431563792145, 0.03002396649957422, 0.1929610478539887, 1.3351008260980255, 0.6138233151024063, 14.164113458989194, 3.3577680429114474, 4.796460332370576, 4.198087947396606, 4.60613296578848, 0.13607353238111122, 2.602077096629766, 11.585563915055, 0.1387072136530037, 0.03546690779481867, 0.07128497309255634, 0.44737465871880183, 5.150427095312925, 0.47810094022421407, 0.1290503823227313, 0.273727273525358, 0.37626526437770497, 0.16047897883398152, 1.0963137241131078, 0.5514928583342844, 0.29725482622093075, 1.5475511153640187, 0.9021236249989026, 0.214206076780588, 1.5447418553406667, 0.38135704817003047, 0.8903598486511162] 
In [1029]:
np.max(cause_l_percent_2005) #Married
Out[1029]:
14.164113458989194
In [1030]:
np.min(cause_l_percent_2005)  #Ideological Causes/Hero Worshipping
Out[1030]:
0.014924193874057363
In [1031]:
state_s_2005_percent=[]
tot=np.sum(state_s_2005)
for i in state_s_2005:
    xy=i/tot
    avg_state_2005=xy*100
    state_s_2005_percent.append(avg_state_2005)

print(state_s_2005_percent,end=" ")
[0.12205744954373345, 11.803570048682483, 0.06146778034576505, 2.4954162598085015, 0.4768143532535774, 0.07815189215390127, 4.286060512395417, 0.060589669197968404, 0.027923934499933262, 1.0930727567772618, 0.24762734367865347, 4.1841996192510065, 1.7966154083919328, 0.31524190205899505, 0.25816467745221316, 0.709513807419688, 10.148330535085808, 8.117259450232172, 0.0, 4.783949533196114, 12.667631418114379, 0.023533378760950047, 0.062345891493561685, 0.023533378760950047, 0.023709000990509373, 3.6950917099282754, 0.47242379751459423, 0.5163293549044263, 3.668572753264817, 0.09571411510983414, 10.604070220792266, 0.6278494706746001, 3.0286053487506233, 0.2397243433484837, 13.184838884166602] 
In [1032]:
np.max(state_s_2005_percent) #Maharashtra
Out[1032]:
13.184838884166602
In [1033]:
np.min(state_s_2005_percent)  #Lakshdweep
Out[1033]:
0.0
In [1034]:
l_age_grp_2005=[s5_4,s5_5,s5_6,s5_7,s5_8,s5_54]
l_age_grp_2005
Out[1034]:
[7665, 120701, 114548, 70874, 27929, 227828]
In [1035]:
l_age_grp_2005_percent=[]
for i in l_age_grp_2005:
    yz=i/s5_1
    avg_2005_age_grp=yz*100
    l_age_grp_2005_percent.append(avg_2005_age_grp)
l_age_grp_2005_percent
Out[1035]:
[1.3458111299370552,
 21.192530879912912,
 20.11219482218262,
 12.443968430940487,
 4.90373894951233,
 40.00175578751459]
In [1036]:
np.max(l_age_grp_2005_percent)  #0-100+
Out[1036]:
40.00175578751459
In [1037]:
np.min(l_age_grp_2005_percent)  #0-14
Out[1037]:
1.3458111299370552
In [1038]:
total_male_percent_2005= (s5_2/s5_1)*100
total_male_percent_2005
Out[1038]:
64.00846289582034
In [1039]:
total_female_percent_2005= (s5_3/s5_1)*100
total_female_percent_2005
Out[1039]:
35.99153710417965
In [ ]:
 

2006

In [1040]:
df_2006 = suicide_df.loc[(suicide_df["Year"]==2006)]

df_2006
Out[1040]:
State Year Type Gender Age_group Total
152 A & N ISLANDS 2006 Cancer Female 45-59 0
153 A & N ISLANDS 2006 Dowry Dispute Male 60+ 0
154 A & N ISLANDS 2006 Drug Abuse/Addiction Female 15-29 0
155 A & N ISLANDS 2006 Illness (Aids/STD) Male 0-14 0
156 A & N ISLANDS 2006 Insanity/Mental Illness Male 30-44 4
... ... ... ... ... ... ...
236479 WEST BENGAL 2006 By Jumping from (Other sites) Male 15-29 67
236480 WEST BENGAL 2006 By touching electric wires Female 0-14 0
236481 WEST BENGAL 2006 House Wife Male 15-29 0
236482 WEST BENGAL 2006 Self-employed (Business activity) Male 0-14 0
236483 WEST BENGAL 2006 Service (Government) Male 60+ 0

19708 rows × 6 columns

In [1041]:
t2006_dcount = df_2006.loc[:,"Total"]

s6_1 = np.sum(t2006_dcount)

s6_1
Out[1041]:
590543
In [1042]:
male_2006 = df_2006.loc[(df_2006["Gender"]=="Male")]

male_2006
Out[1042]:
State Year Type Gender Age_group Total
153 A & N ISLANDS 2006 Dowry Dispute Male 60+ 0
155 A & N ISLANDS 2006 Illness (Aids/STD) Male 0-14 0
156 A & N ISLANDS 2006 Insanity/Mental Illness Male 30-44 4
157 A & N ISLANDS 2006 Love Affairs Male 30-44 1
158 A & N ISLANDS 2006 Not having Children(Barrenness/Impotency Male 45-59 0
... ... ... ... ... ... ...
236477 WEST BENGAL 2006 By Fire-Arms Male 45-59 1
236479 WEST BENGAL 2006 By Jumping from (Other sites) Male 15-29 67
236481 WEST BENGAL 2006 House Wife Male 15-29 0
236482 WEST BENGAL 2006 Self-employed (Business activity) Male 0-14 0
236483 WEST BENGAL 2006 Service (Government) Male 60+ 0

9864 rows × 6 columns

In [1043]:
m2006_count = male_2006.loc[:,"Total"]
s6_2 = np.sum(m2006_count)

s6_2
Out[1043]:
378506
In [1044]:
female_2006 = df_2006.loc[(df_2006["Gender"]=="Female")]

female_2006
Out[1044]:
State Year Type Gender Age_group Total
152 A & N ISLANDS 2006 Cancer Female 45-59 0
154 A & N ISLANDS 2006 Drug Abuse/Addiction Female 15-29 0
159 A & N ISLANDS 2006 Others Female 15-29 11
160 A & N ISLANDS 2006 Poverty Female 60+ 0
233 A & N ISLANDS 2006 Love Affairs Female 60+ 0
... ... ... ... ... ... ...
236472 WEST BENGAL 2006 Professional/Career Problem Female 60+ 0
236474 WEST BENGAL 2006 Property Dispute Female 30-44 126
236475 WEST BENGAL 2006 By coming under running vehicles/trains Female 45-59 37
236478 WEST BENGAL 2006 By Jumping from (Building) Female 60+ 0
236480 WEST BENGAL 2006 By touching electric wires Female 0-14 0

9844 rows × 6 columns

In [1045]:
fm2006_count = female_2006.loc[:,"Total"]
s6_3 = np.sum(fm2006_count)
s6_3
c:\program files\python\python38-32\lib\site-packages\IPython\core\displayhook.py:275: UserWarning: Output cache limit (currently 1000 entries) hit.
Flushing oldest 200 entries.
  warn('Output cache limit (currently {sz} entries) hit.\n'
Out[1045]:
212037
In [1046]:
df_age_d014_2006 = df_2006.loc[(df_2006["Age_group"]=="0-14")]

df_age_d014_2006
Out[1046]:
State Year Type Gender Age_group Total
155 A & N ISLANDS 2006 Illness (Aids/STD) Male 0-14 0
231 A & N ISLANDS 2006 Causes Not known Male 0-14 0
472 A & N ISLANDS 2006 Death of Dear Person Male 0-14 0
479 A & N ISLANDS 2006 By Fire/Self Immolation Male 0-14 0
1196 A & N ISLANDS 2006 Failure in Examination Male 0-14 0
... ... ... ... ... ... ...
236465 WEST BENGAL 2006 Cancer Female 0-14 0
236469 WEST BENGAL 2006 Insanity/Mental Illness Male 0-14 0
236476 WEST BENGAL 2006 By coming under running vehicles/trains Male 0-14 4
236480 WEST BENGAL 2006 By touching electric wires Female 0-14 0
236482 WEST BENGAL 2006 Self-employed (Business activity) Male 0-14 0

3750 rows × 6 columns

In [1047]:
t_014_2006 = df_age_d014_2006.loc[:,"Total"]

s6_4 = np.sum(t_014_2006)
s6_4
Out[1047]:
7389
In [1048]:
df_age_d1529_2006 = df_2006.loc[(df_2006["Age_group"]=="15-29")]

df_age_d1529_2006
Out[1048]:
State Year Type Gender Age_group Total
154 A & N ISLANDS 2006 Drug Abuse/Addiction Female 15-29 0
159 A & N ISLANDS 2006 Others Female 15-29 11
235 A & N ISLANDS 2006 Others Male 15-29 15
475 A & N ISLANDS 2006 Other Prolonged Illness Female 15-29 9
476 A & N ISLANDS 2006 Professional/Career Problem Male 15-29 0
... ... ... ... ... ... ...
236467 WEST BENGAL 2006 Failure in Examination Female 15-29 115
236468 WEST BENGAL 2006 Illness (Aids/STD) Male 15-29 2
236471 WEST BENGAL 2006 Paralysis Male 15-29 2
236479 WEST BENGAL 2006 By Jumping from (Other sites) Male 15-29 67
236481 WEST BENGAL 2006 House Wife Male 15-29 0

3767 rows × 6 columns

In [1049]:
t_1529_2006 = df_age_d1529_2006.loc[:,"Total"]

s6_5 = np.sum(t_1529_2006)

s6_5
Out[1049]:
126640
In [1050]:
df_age_d3044_2006 = df_2006.loc[(df_2006["Age_group"]=="30-44")]

df_age_d3044_2006
Out[1050]:
State Year Type Gender Age_group Total
156 A & N ISLANDS 2006 Insanity/Mental Illness Male 30-44 4
157 A & N ISLANDS 2006 Love Affairs Male 30-44 1
236 A & N ISLANDS 2006 By Fire-Arms Male 30-44 0
237 A & N ISLANDS 2006 By Overdose of sleeping pills Male 30-44 0
473 A & N ISLANDS 2006 Ideological Causes/Hero Worshipping Male 30-44 0
... ... ... ... ... ... ...
236224 UTTARAKHAND 2006 Causes Not known Female 30-44 2
236230 UTTARAKHAND 2006 Insanity/Mental Illness Male 30-44 3
236233 UTTARAKHAND 2006 Unemployment Male 30-44 4
236236 UTTARAKHAND 2006 By Jumping from (Other sites) Female 30-44 0
236474 WEST BENGAL 2006 Property Dispute Female 30-44 126

3765 rows × 6 columns

In [1051]:
t_3044_2006 = df_age_d3044_2006.loc[:,"Total"]

s6_6 = np.sum(t_3044_2006)
s6_6
Out[1051]:
122097
In [1052]:
df_age_d4559_2006 = df_2006.loc[(df_2006["Age_group"]=="45-59")]

df_age_d4559_2006
Out[1052]:
State Year Type Gender Age_group Total
152 A & N ISLANDS 2006 Cancer Female 45-59 0
158 A & N ISLANDS 2006 Not having Children(Barrenness/Impotency Male 45-59 0
232 A & N ISLANDS 2006 Failure in Examination Male 45-59 0
234 A & N ISLANDS 2006 Not having Children(Barrenness/Impotency Female 45-59 0
1197 A & N ISLANDS 2006 Fall in Social Reputation Female 45-59 0
... ... ... ... ... ... ...
236232 UTTARAKHAND 2006 Others Female 45-59 0
236466 WEST BENGAL 2006 Divorce Female 45-59 15
236473 WEST BENGAL 2006 Professional/Career Problem Male 45-59 35
236475 WEST BENGAL 2006 By coming under running vehicles/trains Female 45-59 37
236477 WEST BENGAL 2006 By Fire-Arms Male 45-59 1

3759 rows × 6 columns

In [1053]:
t_4559_2006 = df_age_d4559_2006.loc[:,"Total"]

s6_7 = np.sum(t_4559_2006)

s6_7
Out[1053]:
70815
In [1054]:
df_age_d60_2006 = df_2006.loc[(df_2006["Age_group"]=="60+")]

df_age_d60_2006
Out[1054]:
State Year Type Gender Age_group Total
153 A & N ISLANDS 2006 Dowry Dispute Male 60+ 0
160 A & N ISLANDS 2006 Poverty Female 60+ 0
233 A & N ISLANDS 2006 Love Affairs Female 60+ 0
471 A & N ISLANDS 2006 Bankruptcy or Sudden change in Economic Female 60+ 0
1195 A & N ISLANDS 2006 Divorce Male 60+ 0
... ... ... ... ... ... ...
236238 UTTARAKHAND 2006 By Over Alcoholism Female 60+ 0
236470 WEST BENGAL 2006 Other Prolonged Illness Male 60+ 75
236472 WEST BENGAL 2006 Professional/Career Problem Female 60+ 0
236478 WEST BENGAL 2006 By Jumping from (Building) Female 60+ 0
236483 WEST BENGAL 2006 Service (Government) Male 60+ 0

3757 rows × 6 columns

In [1055]:
t_60_2006 = df_age_d60_2006.loc[:,"Total"]

s6_8 = np.sum(t_60_2006)
s6_8
Out[1055]:
27378
In [1056]:
df_age_d0100_2006 = df_2006.loc[(df_2006["Age_group"]=="0-100+")]

df_age_d0100_2006
Out[1056]:
State Year Type Gender Age_group Total
2396 A & N ISLANDS 2006 Middle Female 0-100+ 14
2580 A & N ISLANDS 2006 Primary Male 0-100+ 38
2803 A & N ISLANDS 2006 Never Married Female 0-100+ 10
2967 A & N ISLANDS 2006 Married Female 0-100+ 27
3160 A & N ISLANDS 2006 Widowed/Widower Male 0-100+ 0
... ... ... ... ... ... ...
234952 PUNJAB 2006 Matriculate/Secondary Male 0-100+ 180
235158 RAJASTHAN 2006 Matriculate/Secondary Female 0-100+ 84
235610 TAMIL NADU 2006 Graduate Female 0-100+ 102
236014 UTTAR PRADESH 2006 Diploma Male 0-100+ 52
236234 UTTARAKHAND 2006 Post Graduate and Above Male 0-100+ 3

910 rows × 6 columns

In [1057]:
t_0100_2006 = df_age_d0100_2006.loc[:,"Total"]

s6_54 = np.sum(t_0100_2006)
s6_54
Out[1057]:
236224
In [1058]:
df_014m_2006 = df_age_d014_2006.loc[(df_age_d014_2006["Gender"]=="Male")]
df_014m_2006
Out[1058]:
State Year Type Gender Age_group Total
155 A & N ISLANDS 2006 Illness (Aids/STD) Male 0-14 0
231 A & N ISLANDS 2006 Causes Not known Male 0-14 0
472 A & N ISLANDS 2006 Death of Dear Person Male 0-14 0
479 A & N ISLANDS 2006 By Fire/Self Immolation Male 0-14 0
1196 A & N ISLANDS 2006 Failure in Examination Male 0-14 0
... ... ... ... ... ... ...
235835 TRIPURA 2006 By Overdose of sleeping pills Male 0-14 0
235836 TRIPURA 2006 By Self Infliction of injury Male 0-14 0
236469 WEST BENGAL 2006 Insanity/Mental Illness Male 0-14 0
236476 WEST BENGAL 2006 By coming under running vehicles/trains Male 0-14 4
236482 WEST BENGAL 2006 Self-employed (Business activity) Male 0-14 0

1874 rows × 6 columns

In [1059]:
t_014m_2006 = df_014m_2006.loc[:,"Total"]

s6_9 = np.sum(t_014m_2006)
s6_9
Out[1059]:
3582
In [1060]:
df_014fm_2006 = df_age_d014_2006.loc[(df_age_d014_2006["Gender"]=="Female")]
df_014fm_2006
Out[1060]:
State Year Type Gender Age_group Total
1582 A & N ISLANDS 2006 Failure in Examination Female 0-14 0
1593 A & N ISLANDS 2006 Service (Private) Female 0-14 0
2227 A & N ISLANDS 2006 Causes Not known Female 0-14 0
2465 A & N ISLANDS 2006 Bankruptcy or Sudden change in Economic Female 0-14 0
2470 A & N ISLANDS 2006 Illegitimate Pregnancy Female 0-14 0
... ... ... ... ... ... ...
235615 TAMIL NADU 2006 By touching electric wires Female 0-14 0
235839 TRIPURA 2006 Unemployed Female 0-14 0
236226 UTTARAKHAND 2006 Failure in Examination Female 0-14 0
236465 WEST BENGAL 2006 Cancer Female 0-14 0
236480 WEST BENGAL 2006 By touching electric wires Female 0-14 0

1876 rows × 6 columns

In [1061]:
t_014fm_2006 = df_014fm_2006.loc[:,"Total"]

s6_10 = np.sum(t_014fm_2006)
s6_10
Out[1061]:
3807
In [1062]:
df_1529m_2006 = df_age_d1529_2006.loc[(df_age_d1529_2006["Gender"]=="Male")]
df_1529m_2006
Out[1062]:
State Year Type Gender Age_group Total
235 A & N ISLANDS 2006 Others Male 15-29 15
476 A & N ISLANDS 2006 Professional/Career Problem Male 15-29 0
477 A & N ISLANDS 2006 Property Dispute Male 15-29 0
1586 A & N ISLANDS 2006 By Jumping off Moving Vehicles/Trains Male 15-29 0
1994 A & N ISLANDS 2006 Drug Abuse/Addiction Male 15-29 0
... ... ... ... ... ... ...
236019 UTTAR PRADESH 2006 By Over Alcoholism Male 15-29 13
236468 WEST BENGAL 2006 Illness (Aids/STD) Male 15-29 2
236471 WEST BENGAL 2006 Paralysis Male 15-29 2
236479 WEST BENGAL 2006 By Jumping from (Other sites) Male 15-29 67
236481 WEST BENGAL 2006 House Wife Male 15-29 0

1885 rows × 6 columns

In [1063]:
t_1529m_2006 = df_1529m_2006.loc[:,"Total"]

s6_11 = np.sum(t_1529m_2006)
s6_11
Out[1063]:
68271
In [1064]:
df_1529fm_2006 = df_age_d1529_2006.loc[(df_age_d1529_2006["Gender"]=="Female")]
df_1529fm_2006
Out[1064]:
State Year Type Gender Age_group Total
154 A & N ISLANDS 2006 Drug Abuse/Addiction Female 15-29 0
159 A & N ISLANDS 2006 Others Female 15-29 11
475 A & N ISLANDS 2006 Other Prolonged Illness Female 15-29 9
1516 A & N ISLANDS 2006 By coming under running vehicles/trains Female 15-29 0
1520 A & N ISLANDS 2006 Farming/Agriculture Activity Female 15-29 0
... ... ... ... ... ... ...
236006 UTTAR PRADESH 2006 Causes Not known Female 15-29 91
236227 UTTARAKHAND 2006 Failure in Examination Female 15-29 3
236235 UTTARAKHAND 2006 By Fire/Self Immolation Female 15-29 11
236237 UTTARAKHAND 2006 By Over Alcoholism Female 15-29 0
236467 WEST BENGAL 2006 Failure in Examination Female 15-29 115

1882 rows × 6 columns

In [1065]:
t_1529fm_2006 = df_1529fm_2006.loc[:,"Total"]

s6_12 = np.sum(t_1529fm_2006)
s6_12
Out[1065]:
58369
In [1066]:
df_3044m_2006 = df_age_d3044_2006.loc[(df_age_d3044_2006["Gender"]=="Male")]
df_3044m_2006
Out[1066]:
State Year Type Gender Age_group Total
156 A & N ISLANDS 2006 Insanity/Mental Illness Male 30-44 4
157 A & N ISLANDS 2006 Love Affairs Male 30-44 1
236 A & N ISLANDS 2006 By Fire-Arms Male 30-44 0
237 A & N ISLANDS 2006 By Overdose of sleeping pills Male 30-44 0
473 A & N ISLANDS 2006 Ideological Causes/Hero Worshipping Male 30-44 0
... ... ... ... ... ... ...
236010 UTTAR PRADESH 2006 Love Affairs Male 30-44 11
236013 UTTAR PRADESH 2006 Suspected/Illicit Relation Male 30-44 10
236022 UTTAR PRADESH 2006 Unemployed Male 30-44 116
236230 UTTARAKHAND 2006 Insanity/Mental Illness Male 30-44 3
236233 UTTARAKHAND 2006 Unemployment Male 30-44 4

1885 rows × 6 columns

In [1067]:
t_3044m_2006 = df_3044m_2006.loc[:,"Total"]

s6_13 = np.sum(t_3044m_2006)
s6_13
Out[1067]:
83427
In [1068]:
df_3044fm_2006 = df_age_d3044_2006.loc[(df_age_d3044_2006["Gender"]=="Female")]
df_3044fm_2006
Out[1068]:
State Year Type Gender Age_group Total
474 A & N ISLANDS 2006 Illness (Aids/STD) Female 30-44 0
1589 A & N ISLANDS 2006 By Self Infliction of injury Female 30-44 0
2235 A & N ISLANDS 2006 By Overdose of sleeping pills Female 30-44 0
2393 A & N ISLANDS 2006 Paralysis Female 30-44 0
2469 A & N ISLANDS 2006 Cancer Female 30-44 0
... ... ... ... ... ... ...
236009 UTTAR PRADESH 2006 Insanity/Mental Illness Female 30-44 12
236021 UTTAR PRADESH 2006 Professional Activity Female 30-44 3
236224 UTTARAKHAND 2006 Causes Not known Female 30-44 2
236236 UTTARAKHAND 2006 By Jumping from (Other sites) Female 30-44 0
236474 WEST BENGAL 2006 Property Dispute Female 30-44 126

1880 rows × 6 columns

In [1069]:
t_3044fm_2006 = df_3044fm_2006.loc[:,"Total"]

s6_14 = np.sum(t_3044fm_2006)
s6_14
Out[1069]:
38670
In [1070]:
df_4559m_2006 = df_age_d4559_2006.loc[(df_age_d4559_2006["Gender"]=="Male")]
df_4559m_2006
Out[1070]:
State Year Type Gender Age_group Total
158 A & N ISLANDS 2006 Not having Children(Barrenness/Impotency Male 45-59 0
232 A & N ISLANDS 2006 Failure in Examination Male 45-59 0
1518 A & N ISLANDS 2006 By coming under running vehicles/trains Male 45-59 0
1990 A & N ISLANDS 2006 Cancer Male 45-59 0
1995 A & N ISLANDS 2006 Drug Abuse/Addiction Male 45-59 0
... ... ... ... ... ... ...
235830 TRIPURA 2006 Others Male 45-59 18
235840 TRIPURA 2006 Unemployed Male 45-59 3
236229 UTTARAKHAND 2006 Illegitimate Pregnancy Male 45-59 0
236473 WEST BENGAL 2006 Professional/Career Problem Male 45-59 35
236477 WEST BENGAL 2006 By Fire-Arms Male 45-59 1

1884 rows × 6 columns

In [1071]:
t_4559m_2006 = df_4559m_2006.loc[:,"Total"]

s6_15 = np.sum(t_4559m_2006)
s6_15
Out[1071]:
52034
In [1072]:
df_4559fm_2006 = df_age_d4559_2006.loc[(df_age_d4559_2006["Gender"]=="Female")]
df_4559fm_2006
Out[1072]:
State Year Type Gender Age_group Total
152 A & N ISLANDS 2006 Cancer Female 45-59 0
234 A & N ISLANDS 2006 Not having Children(Barrenness/Impotency Female 45-59 0
1197 A & N ISLANDS 2006 Fall in Social Reputation Female 45-59 0
1200 A & N ISLANDS 2006 Other Prolonged Illness Female 45-59 1
1519 A & N ISLANDS 2006 By Fire-Arms Female 45-59 0
... ... ... ... ... ... ...
236015 UTTAR PRADESH 2006 By coming under running vehicles/trains Female 45-59 5
236225 UTTARAKHAND 2006 Causes Not known Female 45-59 3
236232 UTTARAKHAND 2006 Others Female 45-59 0
236466 WEST BENGAL 2006 Divorce Female 45-59 15
236475 WEST BENGAL 2006 By coming under running vehicles/trains Female 45-59 37

1875 rows × 6 columns

In [1073]:
t_4559fm_2006 = df_4559fm_2006.loc[:,"Total"]

s6_16 = np.sum(t_4559fm_2006)
s6_16
Out[1073]:
18781
In [1074]:
df_60m_2006 = df_age_d60_2006.loc[(df_age_d60_2006["Gender"]=="Male")]
df_60m_2006
Out[1074]:
State Year Type Gender Age_group Total
153 A & N ISLANDS 2006 Dowry Dispute Male 60+ 0
1195 A & N ISLANDS 2006 Divorce Male 60+ 0
1199 A & N ISLANDS 2006 Not having Children(Barrenness/Impotency Male 60+ 0
1521 A & N ISLANDS 2006 Farming/Agriculture Activity Male 60+ 1
1588 A & N ISLANDS 2006 By Over Alcoholism Male 60+ 0
... ... ... ... ... ... ...
236011 UTTAR PRADESH 2006 Other Prolonged Illness Male 60+ 27
236020 UTTAR PRADESH 2006 By touching electric wires Male 60+ 4
236231 UTTARAKHAND 2006 Insanity/Mental Illness Male 60+ 3
236470 WEST BENGAL 2006 Other Prolonged Illness Male 60+ 75
236483 WEST BENGAL 2006 Service (Government) Male 60+ 0

1881 rows × 6 columns

In [1075]:
t_60m_2006 = df_60m_2006.loc[:,"Total"]

s6_17 = np.sum(t_60m_2006)
s6_17
Out[1075]:
19788
In [1076]:
df_60fm_2006 = df_age_d60_2006.loc[(df_age_d60_2006["Gender"]=="Female")]
df_60fm_2006
Out[1076]:
State Year Type Gender Age_group Total
160 A & N ISLANDS 2006 Poverty Female 60+ 0
233 A & N ISLANDS 2006 Love Affairs Female 60+ 0
471 A & N ISLANDS 2006 Bankruptcy or Sudden change in Economic Female 60+ 0
1198 A & N ISLANDS 2006 Illegitimate Pregnancy Female 60+ 0
1517 A & N ISLANDS 2006 By coming under running vehicles/trains Female 60+ 0
... ... ... ... ... ... ...
236017 UTTAR PRADESH 2006 By Machine Female 60+ 0
236228 UTTARAKHAND 2006 Fall in Social Reputation Female 60+ 0
236238 UTTARAKHAND 2006 By Over Alcoholism Female 60+ 0
236472 WEST BENGAL 2006 Professional/Career Problem Female 60+ 0
236478 WEST BENGAL 2006 By Jumping from (Building) Female 60+ 0

1876 rows × 6 columns

In [1077]:
t_60fm_2006 = df_60fm_2006.loc[:,"Total"]

s6_18 = np.sum(t_60fm_2006)
s6_18
Out[1077]:
7590
In [1078]:
df_0100fm_2006 = df_age_d0100_2006.loc[(df_age_d0100_2006["Gender"]=="Female")]
df_0100fm_2006
Out[1078]:
State Year Type Gender Age_group Total
2396 A & N ISLANDS 2006 Middle Female 0-100+ 14
2803 A & N ISLANDS 2006 Never Married Female 0-100+ 10
2967 A & N ISLANDS 2006 Married Female 0-100+ 27
3198 A & N ISLANDS 2006 No Education Female 0-100+ 2
3383 A & N ISLANDS 2006 Matriculate/Secondary Female 0-100+ 7
... ... ... ... ... ... ...
234346 NAGALAND 2006 Never Married Female 0-100+ 3
234763 PUDUCHERRY 2006 Middle Female 0-100+ 81
234951 PUNJAB 2006 Graduate Female 0-100+ 2
235158 RAJASTHAN 2006 Matriculate/Secondary Female 0-100+ 84
235610 TAMIL NADU 2006 Graduate Female 0-100+ 102

455 rows × 6 columns

In [1079]:
t_0100fm_2006 = df_0100fm_2006.loc[:,"Total"]

s6_55 = np.sum(t_0100fm_2006)
s6_55
Out[1079]:
84820
In [1080]:
df_0100m_2006 = df_age_d0100_2006.loc[(df_age_d0100_2006["Gender"]=="Male")]
df_0100m_2006
Out[1080]:
State Year Type Gender Age_group Total
2580 A & N ISLANDS 2006 Primary Male 0-100+ 38
3160 A & N ISLANDS 2006 Widowed/Widower Male 0-100+ 0
3394 A & N ISLANDS 2006 Seperated Male 0-100+ 0
3463 A & N ISLANDS 2006 Diploma Male 0-100+ 0
3594 A & N ISLANDS 2006 No Education Male 0-100+ 8
... ... ... ... ... ... ...
233739 MANIPUR 2006 No Education Male 0-100+ 1
234764 PUDUCHERRY 2006 Primary Male 0-100+ 39
234952 PUNJAB 2006 Matriculate/Secondary Male 0-100+ 180
236014 UTTAR PRADESH 2006 Diploma Male 0-100+ 52
236234 UTTARAKHAND 2006 Post Graduate and Above Male 0-100+ 3

455 rows × 6 columns

In [1081]:
t_0100m_2006 = df_0100m_2006.loc[:,"Total"]

s6_56 = np.sum(t_0100m_2006)
s6_56
Out[1081]:
151404
In [1082]:
df_st_AN_2006 = df_2006.loc[(df_2006["State"]=="A & N ISLANDS")]

df_st_AN_2006
Out[1082]:
State Year Type Gender Age_group Total
152 A & N ISLANDS 2006 Cancer Female 45-59 0
153 A & N ISLANDS 2006 Dowry Dispute Male 60+ 0
154 A & N ISLANDS 2006 Drug Abuse/Addiction Female 15-29 0
155 A & N ISLANDS 2006 Illness (Aids/STD) Male 0-14 0
156 A & N ISLANDS 2006 Insanity/Mental Illness Male 30-44 4
... ... ... ... ... ... ...
7970 A & N ISLANDS 2006 Professional Activity Female 15-29 0
7971 A & N ISLANDS 2006 Professional Activity Female 60+ 0
7972 A & N ISLANDS 2006 Self-employed (Business activity) Female 15-29 0
7973 A & N ISLANDS 2006 Service (Private) Male 30-44 28
7974 A & N ISLANDS 2006 Student Male 15-29 0

559 rows × 6 columns

In [1083]:
t_AN_2006 = df_st_AN_2006.loc[:,"Total"]

s6_19 = np.sum(t_AN_2006)
s6_19
Out[1083]:
665
In [1084]:
df_st_AP_2006 = df_2006.loc[(df_2006["State"]=="ANDHRA PRADESH")]

df_st_AP_2006
Out[1084]:
State Year Type Gender Age_group Total
7294 ANDHRA PRADESH 2006 Causes Not known Female 60+ 20
7295 ANDHRA PRADESH 2006 Causes Not known Male 45-59 171
7296 ANDHRA PRADESH 2006 Drug Abuse/Addiction Female 0-14 0
7297 ANDHRA PRADESH 2006 Family Problems Male 15-29 624
7298 ANDHRA PRADESH 2006 Insanity/Mental Illness Male 45-59 129
... ... ... ... ... ... ...
229425 ANDHRA PRADESH 2006 Farming/Agriculture Activity Female 60+ 27
229426 ANDHRA PRADESH 2006 Farming/Agriculture Activity Male 30-44 777
229427 ANDHRA PRADESH 2006 Others Female 45-59 83
229428 ANDHRA PRADESH 2006 Others Female 60+ 110
229429 ANDHRA PRADESH 2006 Retired Person Male 30-44 3

566 rows × 6 columns

In [1085]:
t_AP_2006 = df_st_AP_2006.loc[:,"Total"]

s6_20 = np.sum(t_AP_2006)
s6_20
Out[1085]:
66380
In [1086]:
df_st_ARP_2006 = df_2006.loc[(df_2006["State"]=="ARUNACHAL PRADESH")]

df_st_ARP_2006
Out[1086]:
State Year Type Gender Age_group Total
12310 ARUNACHAL PRADESH 2006 Cancellation/Non-Settlement of Marriage Female 15-29 0
12311 ARUNACHAL PRADESH 2006 Cancer Male 15-29 0
12312 ARUNACHAL PRADESH 2006 Family Problems Male 15-29 1
12313 ARUNACHAL PRADESH 2006 Illness (Aids/STD) Female 15-29 0
12314 ARUNACHAL PRADESH 2006 Not having Children(Barrenness/Impotency Male 0-14 0
... ... ... ... ... ... ...
229636 ARUNACHAL PRADESH 2006 Service (Government) Female 15-29 0
229637 ARUNACHAL PRADESH 2006 Service (Government) Female 60+ 0
229638 ARUNACHAL PRADESH 2006 Service (Private) Female 30-44 0
229639 ARUNACHAL PRADESH 2006 Unemployed Male 15-29 3
229640 ARUNACHAL PRADESH 2006 Never Married Female 0-100+ 7

561 rows × 6 columns

In [1087]:
t_ARP_2006 = df_st_ARP_2006.loc[:,"Total"]

s6_21 = np.sum(t_ARP_2006)
s6_21
Out[1087]:
645
In [1088]:
df_st_AS_2006 = df_2006.loc[(df_2006["State"]=="ASSAM")]

df_st_AS_2006
Out[1088]:
State Year Type Gender Age_group Total
17028 ASSAM 2006 Dowry Dispute Female 30-44 0
17029 ASSAM 2006 Ideological Causes/Hero Worshipping Female 30-44 0
17030 ASSAM 2006 Illness (Aids/STD) Female 60+ 0
17031 ASSAM 2006 Not having Children(Barrenness/Impotency Female 45-59 1
17032 ASSAM 2006 Physical Abuse (Rape/Incest Etc.) Male 30-44 1
... ... ... ... ... ... ...
229825 ASSAM 2006 Ideological Causes/Hero Worshipping Female 15-29 0
229826 ASSAM 2006 Insanity/Mental Illness Male 30-44 7
229827 ASSAM 2006 Paralysis Male 30-44 0
229828 ASSAM 2006 Unemployment Male 30-44 11
229829 ASSAM 2006 By Fire-Arms Female 45-59 0

566 rows × 6 columns

In [1089]:
t_AS_2006 = df_st_AS_2006.loc[:,"Total"]

s6_22 = np.sum(t_AS_2006)
s6_22
Out[1089]:
15155
In [1090]:
df_st_BH_2006 = df_2006.loc[(df_2006["State"]=="BIHAR")]

df_st_BH_2006
Out[1090]:
State Year Type Gender Age_group Total
24629 BIHAR 2006 Cancer Male 60+ 0
24630 BIHAR 2006 Causes Not known Male 30-44 14
24631 BIHAR 2006 Divorce Female 45-59 0
24632 BIHAR 2006 Fall in Social Reputation Male 45-59 0
24633 BIHAR 2006 Family Problems Male 0-14 3
... ... ... ... ... ... ...
230052 BIHAR 2006 By Overdose of sleeping pills Male 45-59 1
230053 BIHAR 2006 Others Male 15-29 13
230054 BIHAR 2006 Self-employed (Business activity) Female 15-29 1
230055 BIHAR 2006 Service (Government) Male 45-59 2
230056 BIHAR 2006 Divorcee Male 0-100+ 8

566 rows × 6 columns

In [1091]:
t_BH_2006 = df_st_BH_2006.loc[:,"Total"]

s6_23 = np.sum(t_BH_2006)
s6_23
Out[1091]:
3090
In [1092]:
df_st_CH_2006 = df_2006.loc[(df_2006["State"]=="CHANDIGARH")]

df_st_CH_2006
Out[1092]:
State Year Type Gender Age_group Total
30506 CHANDIGARH 2006 Bankruptcy or Sudden change in Economic Female 45-59 0
30507 CHANDIGARH 2006 Dowry Dispute Male 30-44 0
30508 CHANDIGARH 2006 Failure in Examination Male 45-59 0
30509 CHANDIGARH 2006 Fall in Social Reputation Female 15-29 0
30510 CHANDIGARH 2006 Family Problems Female 45-59 0
... ... ... ... ... ... ...
230271 CHANDIGARH 2006 House Wife Female 30-44 6
230272 CHANDIGARH 2006 Retired Person Female 0-14 0
230273 CHANDIGARH 2006 Retired Person Male 45-59 0
230274 CHANDIGARH 2006 Student Female 60+ 0
230275 CHANDIGARH 2006 Unemployed Male 30-44 15

556 rows × 6 columns

In [1093]:
t_CH_2006 = df_st_CH_2006.loc[:,"Total"]

s6_24 = np.sum(t_CH_2006)
s6_24
Out[1093]:
400
In [1094]:
df_st_CT_2006 = df_2006.loc[(df_2006["State"]=="CHHATTISGARH")]

df_st_CT_2006
Out[1094]:
State Year Type Gender Age_group Total
36969 CHHATTISGARH 2006 Causes Not known Female 15-29 252
36970 CHHATTISGARH 2006 Divorce Female 15-29 0
36971 CHHATTISGARH 2006 Illness (Aids/STD) Female 45-59 0
36972 CHHATTISGARH 2006 Unemployment Male 0-14 1
36973 CHHATTISGARH 2006 By Drowning Male 60+ 6
... ... ... ... ... ... ...
230509 CHHATTISGARH 2006 By Jumping from (Other sites) Female 15-29 0
230510 CHHATTISGARH 2006 By Over Alcoholism Male 0-14 0
230511 CHHATTISGARH 2006 Others Male 15-29 179
230512 CHHATTISGARH 2006 Professional Activity Male 0-14 1
230513 CHHATTISGARH 2006 Student Male 45-59 0

566 rows × 6 columns

In [1095]:
t_CT_2006 = df_st_CT_2006.loc[:,"Total"]

s6_25 = np.sum(t_CT_2006)
s6_25
Out[1095]:
23130
In [1096]:
df_st_DN_2006 = df_2006.loc[(df_2006["State"]=="D & N HAVELI")]

df_st_DN_2006
Out[1096]:
State Year Type Gender Age_group Total
43656 D & N HAVELI 2006 Bankruptcy or Sudden change in Economic Female 15-29 0
43657 D & N HAVELI 2006 Cancellation/Non-Settlement of Marriage Male 45-59 0
43658 D & N HAVELI 2006 Drug Abuse/Addiction Female 60+ 0
43659 D & N HAVELI 2006 Failure in Examination Male 60+ 0
43660 D & N HAVELI 2006 Ideological Causes/Hero Worshipping Male 45-59 0
... ... ... ... ... ... ...
230714 D & N HAVELI 2006 By Machine Male 30-44 0
230715 D & N HAVELI 2006 By Overdose of sleeping pills Female 15-29 0
230716 D & N HAVELI 2006 By Self Infliction of injury Female 15-29 0
230717 D & N HAVELI 2006 House Wife Female 15-29 7
230718 D & N HAVELI 2006 Retired Person Male 60+ 0

556 rows × 6 columns

In [1097]:
t_DN_2006 = df_st_DN_2006.loc[:,"Total"]

s6_26 = np.sum(t_DN_2006)
s6_26
Out[1097]:
210
In [1098]:
df_st_DD_2006 = df_2006.loc[(df_2006["State"]=="DAMAN & DIU")]

df_st_DD_2006
Out[1098]:
State Year Type Gender Age_group Total
50349 DAMAN & DIU 2006 Cancellation/Non-Settlement of Marriage Female 30-44 0
50350 DAMAN & DIU 2006 Cancellation/Non-Settlement of Marriage Male 60+ 0
50351 DAMAN & DIU 2006 Cancer Male 30-44 0
50352 DAMAN & DIU 2006 Causes Not known Male 45-59 0
50353 DAMAN & DIU 2006 Death of Dear Person Female 30-44 0
... ... ... ... ... ... ...
230914 DAMAN & DIU 2006 Others Female 0-14 0
230915 DAMAN & DIU 2006 Retired Person Female 15-29 0
230916 DAMAN & DIU 2006 Service (Government) Female 30-44 0
230917 DAMAN & DIU 2006 Student Female 0-14 1
230918 DAMAN & DIU 2006 Unemployed Male 30-44 0

561 rows × 6 columns

In [1099]:
t_DD_2006 = df_st_DD_2006.loc[:,"Total"]

s6_27 = np.sum(t_DD_2006)
s6_27
Out[1099]:
110
In [1100]:
df_st_DL_2006 = df_2006.loc[(df_2006["State"]=="DELHI (UT)")]

df_st_DL_2006
Out[1100]:
State Year Type Gender Age_group Total
55100 DELHI (UT) 2006 Cancellation/Non-Settlement of Marriage Female 45-59 0
55101 DELHI (UT) 2006 Failure in Examination Female 0-14 4
55102 DELHI (UT) 2006 Illegitimate Pregnancy Male 15-29 0
55103 DELHI (UT) 2006 Insanity/Mental Illness Male 30-44 6
55104 DELHI (UT) 2006 Other Prolonged Illness Female 15-29 12
... ... ... ... ... ... ...
231142 DELHI (UT) 2006 Others Female 45-59 2
231143 DELHI (UT) 2006 Self-employed (Business activity) Male 0-14 0
231144 DELHI (UT) 2006 Service (Government) Male 60+ 0
231145 DELHI (UT) 2006 Married Female 0-100+ 358
231146 DELHI (UT) 2006 Seperated Male 0-100+ 56

565 rows × 6 columns

In [1101]:
t_DL_2006 = df_st_DL_2006.loc[:,"Total"]

s6_28 = np.sum(t_DL_2006)
s6_28
Out[1101]:
7458
In [1102]:
df_st_GOA_2006 = df_2006.loc[(df_2006["State"]=="GOA")]

df_st_GOA_2006
Out[1102]:
State Year Type Gender Age_group Total
60639 GOA 2006 Divorce Female 30-44 0
60640 GOA 2006 Divorce Female 45-59 1
60641 GOA 2006 Failure in Examination Male 60+ 0
60642 GOA 2006 Other Prolonged Illness Male 0-14 0
60643 GOA 2006 By Consuming Insecticides Male 15-29 4
... ... ... ... ... ... ...
231382 GOA 2006 By Over Alcoholism Female 60+ 0
231383 GOA 2006 By Overdose of sleeping pills Male 15-29 0
231384 GOA 2006 By Overdose of sleeping pills Male 60+ 0
231385 GOA 2006 By Self Infliction of injury Male 60+ 0
231386 GOA 2006 Retired Person Female 45-59 0

564 rows × 6 columns

In [1103]:
t_GOA_2006 = df_st_GOA_2006.loc[:,"Total"]

s6_29 = np.sum(t_GOA_2006)
s6_29
Out[1103]:
1375
In [1104]:
df_st_GJ_2006 = df_2006.loc[(df_2006["State"]=="GUJARAT")]

df_st_GJ_2006
Out[1104]:
State Year Type Gender Age_group Total
65827 GUJARAT 2006 Death of Dear Person Female 45-59 16
65828 GUJARAT 2006 Dowry Dispute Female 45-59 1
65829 GUJARAT 2006 Failure in Examination Male 30-44 2
65830 GUJARAT 2006 Failure in Examination Male 45-59 0
65831 GUJARAT 2006 Fall in Social Reputation Female 0-14 0
... ... ... ... ... ... ...
231605 GUJARAT 2006 House Wife Female 60+ 57
231606 GUJARAT 2006 House Wife Male 0-14 0
231607 GUJARAT 2006 Public Sector Undertaking Female 60+ 0
231608 GUJARAT 2006 Student Male 15-29 100
231609 GUJARAT 2006 Unemployed Male 30-44 154

565 rows × 6 columns

In [1105]:
t_GJ_2006 = df_st_GJ_2006.loc[:,"Total"]

s6_30 = np.sum(t_GJ_2006)
s6_30
Out[1105]:
25172
In [1106]:
df_st_HR_2006 = df_2006.loc[(df_2006["State"]=="HARYANA")]

df_st_HR_2006
Out[1106]:
State Year Type Gender Age_group Total
72353 HARYANA 2006 Bankruptcy or Sudden change in Economic Female 30-44 1
72354 HARYANA 2006 Cancellation/Non-Settlement of Marriage Female 60+ 0
72355 HARYANA 2006 Causes Not known Female 0-14 3
72356 HARYANA 2006 Family Problems Male 0-14 5
72357 HARYANA 2006 Ideological Causes/Hero Worshipping Male 45-59 0
... ... ... ... ... ... ...
231788 HARYANA 2006 By touching electric wires Female 45-59 0
231789 HARYANA 2006 House Wife Male 0-14 0
231790 HARYANA 2006 Others Male 15-29 115
231791 HARYANA 2006 Professional Activity Female 0-14 0
231792 HARYANA 2006 Public Sector Undertaking Female 0-14 0

566 rows × 6 columns

In [1107]:
t_HR_2006 = df_st_HR_2006.loc[:,"Total"]

s6_31 = np.sum(t_HR_2006)
s6_31
Out[1107]:
11580
In [1108]:
df_st_HP_2006 = df_2006.loc[(df_2006["State"]=="HIMACHAL PRADESH")]

df_st_HP_2006
Out[1108]:
State Year Type Gender Age_group Total
79706 HIMACHAL PRADESH 2006 Causes Not known Male 30-44 19
79707 HIMACHAL PRADESH 2006 Causes Not known Male 60+ 2
79708 HIMACHAL PRADESH 2006 Divorce Male 45-59 0
79709 HIMACHAL PRADESH 2006 Fall in Social Reputation Female 15-29 0
79710 HIMACHAL PRADESH 2006 Illegitimate Pregnancy Female 30-44 0
... ... ... ... ... ... ...
232039 HIMACHAL PRADESH 2006 By Machine Female 30-44 0
232040 HIMACHAL PRADESH 2006 Others Male 15-29 6
232041 HIMACHAL PRADESH 2006 Farming/Agriculture Activity Male 0-14 0
232042 HIMACHAL PRADESH 2006 Retired Person Female 0-14 0
232043 HIMACHAL PRADESH 2006 Student Female 60+ 0

564 rows × 6 columns

In [1109]:
t_HP_2006 = df_st_HP_2006.loc[:,"Total"]

s6_32 = np.sum(t_HP_2006)
s6_32
Out[1109]:
2285
In [1110]:
df_st_JK_2006 = df_2006.loc[(df_2006["State"]=="JAMMU & KASHMIR")]

df_st_JK_2006
Out[1110]:
State Year Type Gender Age_group Total
86056 JAMMU & KASHMIR 2006 Bankruptcy or Sudden change in Economic Female 15-29 0
86057 JAMMU & KASHMIR 2006 Cancellation/Non-Settlement of Marriage Male 45-59 0
86058 JAMMU & KASHMIR 2006 Drug Abuse/Addiction Female 60+ 0
86059 JAMMU & KASHMIR 2006 Drug Abuse/Addiction Male 30-44 1
86060 JAMMU & KASHMIR 2006 Failure in Examination Male 60+ 0
... ... ... ... ... ... ...
232254 JAMMU & KASHMIR 2006 Diploma Female 0-100+ 0
232255 JAMMU & KASHMIR 2006 Middle Female 0-100+ 20
232256 JAMMU & KASHMIR 2006 By Machine Male 30-44 0
232257 JAMMU & KASHMIR 2006 Self-employed (Business activity) Female 30-44 0
232258 JAMMU & KASHMIR 2006 Student Male 30-44 0

561 rows × 6 columns

In [1111]:
t_JK_2006 = df_st_JK_2006.loc[:,"Total"]

s6_33 = np.sum(t_JK_2006)
s6_33
Out[1111]:
1301
In [1112]:
df_st_JH_2006 = df_2006.loc[(df_2006["State"]=="JHARKHAND")]

df_st_JH_2006
Out[1112]:
State Year Type Gender Age_group Total
91783 JHARKHAND 2006 Death of Dear Person Male 0-14 0
91784 JHARKHAND 2006 Dowry Dispute Female 15-29 6
91785 JHARKHAND 2006 Failure in Examination Male 30-44 0
91786 JHARKHAND 2006 Illegitimate Pregnancy Male 60+ 0
91787 JHARKHAND 2006 Illness (Aids/STD) Male 30-44 0
... ... ... ... ... ... ...
232488 JHARKHAND 2006 By Self Infliction of injury Male 0-14 0
232489 JHARKHAND 2006 By touching electric wires Female 15-29 0
232490 JHARKHAND 2006 By touching electric wires Female 60+ 0
232491 JHARKHAND 2006 Self-employed (Business activity) Male 60+ 0
232492 JHARKHAND 2006 Student Female 45-59 0

566 rows × 6 columns

In [1113]:
t_JH_2006 = df_st_JH_2006.loc[:,"Total"]

s6_34 = np.sum(t_JH_2006)
s6_34
Out[1113]:
4280
In [1114]:
df_st_KN_2006 = df_2006.loc[(df_2006["State"]=="KARNATAKA")]

df_st_KN_2006
Out[1114]:
State Year Type Gender Age_group Total
97248 KARNATAKA 2006 Bankruptcy or Sudden change in Economic Female 15-29 11
97249 KARNATAKA 2006 Bankruptcy or Sudden change in Economic Male 0-14 0
97250 KARNATAKA 2006 Divorce Female 15-29 0
97251 KARNATAKA 2006 Illness (Aids/STD) Male 45-59 6
97252 KARNATAKA 2006 Insanity/Mental Illness Female 0-14 6
... ... ... ... ... ... ...
232665 KARNATAKA 2006 By Drowning Male 15-29 178
232666 KARNATAKA 2006 By Fire/Self Immolation Female 0-14 11
232667 KARNATAKA 2006 House Wife Female 30-44 649
232668 KARNATAKA 2006 Professional Activity Female 0-14 1
232669 KARNATAKA 2006 Public Sector Undertaking Female 15-29 16

566 rows × 6 columns

In [1115]:
t_KN_2006 = df_st_KN_2006.loc[:,"Total"]

s6_35 = np.sum(t_KN_2006)
s6_35
Out[1115]:
61060
In [1116]:
df_st_KER_2006 = df_2006.loc[(df_2006["State"]=="KERALA")]

df_st_KER_2006
Out[1116]:
State Year Type Gender Age_group Total
103714 KERALA 2006 Dowry Dispute Male 15-29 0
103715 KERALA 2006 Dowry Dispute Male 30-44 0
103716 KERALA 2006 Fall in Social Reputation Male 30-44 25
103717 KERALA 2006 Fall in Social Reputation Male 60+ 8
103718 KERALA 2006 Ideological Causes/Hero Worshipping Male 15-29 0
... ... ... ... ... ... ...
232860 KERALA 2006 By touching electric wires Male 15-29 4
232861 KERALA 2006 By touching electric wires Male 60+ 1
232862 KERALA 2006 Self-employed (Business activity) Female 45-59 1
232863 KERALA 2006 Service (Government) Male 45-59 41
232864 KERALA 2006 Unemployed Female 15-29 101

566 rows × 6 columns

In [1117]:
t_KER_2006 = df_st_KER_2006.loc[:,"Total"]

s6_36 = np.sum(t_KER_2006)
s6_36
Out[1117]:
45130
In [1118]:
df_st_LD_2006 = df_2006.loc[(df_2006["State"]=="LAKSHADWEEP")]

df_st_LD_2006
Out[1118]:
State Year Type Gender Age_group Total
108071 LAKSHADWEEP 2006 Bankruptcy or Sudden change in Economic Male 30-44 0
108221 LAKSHADWEEP 2006 Bankruptcy or Sudden change in Economic Female 45-59 0
108222 LAKSHADWEEP 2006 Causes Not known Male 60+ 0
108223 LAKSHADWEEP 2006 Failure in Examination Male 45-59 0
108224 LAKSHADWEEP 2006 Fall in Social Reputation Female 0-14 0
... ... ... ... ... ... ...
233074 LAKSHADWEEP 2006 Retired Person Female 0-14 0
233075 LAKSHADWEEP 2006 Retired Person Male 45-59 0
233076 LAKSHADWEEP 2006 Student Female 0-14 0
233077 LAKSHADWEEP 2006 Student Female 15-29 0
233078 LAKSHADWEEP 2006 Unemployed Female 15-29 0

556 rows × 6 columns

In [1119]:
t_LD_2006 = df_st_LD_2006.loc[:,"Total"]

s6_37 = np.sum(t_LD_2006)
s6_37
Out[1119]:
10
In [1120]:
df_st_MP_2006 = df_2006.loc[(df_2006["State"]=="MADHYA PRADESH")]

df_st_MP_2006
Out[1120]:
State Year Type Gender Age_group Total
114210 MADHYA PRADESH 2006 Bankruptcy or Sudden change in Economic Male 60+ 6
114211 MADHYA PRADESH 2006 Cancellation/Non-Settlement of Marriage Male 60+ 0
114212 MADHYA PRADESH 2006 Causes Not known Male 45-59 181
114213 MADHYA PRADESH 2006 Death of Dear Person Female 0-14 0
114214 MADHYA PRADESH 2006 Dowry Dispute Male 60+ 0
... ... ... ... ... ... ...
233296 MADHYA PRADESH 2006 By Over Alcoholism Female 0-14 0
233297 MADHYA PRADESH 2006 By Self Infliction of injury Male 0-14 0
233298 MADHYA PRADESH 2006 By touching electric wires Female 15-29 9
233299 MADHYA PRADESH 2006 Others Female 45-59 18
233300 MADHYA PRADESH 2006 Service (Private) Female 60+ 1

566 rows × 6 columns

In [1121]:
t_MP_2006 = df_st_MP_2006.loc[:,"Total"]

s6_38 = np.sum(t_MP_2006)
s6_38
Out[1121]:
32175
In [1122]:
df_st_MH_2006 = df_2006.loc[(df_2006["State"]=="MAHARASHTRA")]

df_st_MH_2006
Out[1122]:
State Year Type Gender Age_group Total
120914 MAHARASHTRA 2006 Bankruptcy or Sudden change in Economic Female 0-14 0
120915 MAHARASHTRA 2006 Cancellation/Non-Settlement of Marriage Female 0-14 0
120916 MAHARASHTRA 2006 Cancer Male 45-59 22
120917 MAHARASHTRA 2006 Causes Not known Male 45-59 37
120918 MAHARASHTRA 2006 Divorce Female 45-59 0
... ... ... ... ... ... ...
233528 MAHARASHTRA 2006 By Overdose of sleeping pills Female 30-44 3
233529 MAHARASHTRA 2006 By Overdose of sleeping pills Female 45-59 1
233530 MAHARASHTRA 2006 By Self Infliction of injury Female 30-44 3
233531 MAHARASHTRA 2006 By touching electric wires Female 15-29 2
233532 MAHARASHTRA 2006 Student Male 0-14 54

566 rows × 6 columns

In [1123]:
t_MH_2006 = df_st_MH_2006.loc[:,"Total"]

s6_39 = np.sum(t_MH_2006)
s6_39
Out[1123]:
77470
In [1124]:
df_st_MN_2006 = df_2006.loc[(df_2006["State"]=="MANIPUR")]

df_st_MN_2006
Out[1124]:
State Year Type Gender Age_group Total
126455 MANIPUR 2006 Cancellation/Non-Settlement of Marriage Female 15-29 0
126456 MANIPUR 2006 Cancellation/Non-Settlement of Marriage Female 60+ 0
126457 MANIPUR 2006 Causes Not known Male 30-44 9
126458 MANIPUR 2006 Family Problems Male 45-59 0
126459 MANIPUR 2006 Ideological Causes/Hero Worshipping Female 15-29 0
... ... ... ... ... ... ...
233745 MANIPUR 2006 Farming/Agriculture Activity Female 45-59 0
233746 MANIPUR 2006 Others Male 30-44 0
233747 MANIPUR 2006 Others Male 45-59 1
233748 MANIPUR 2006 Service (Private) Male 15-29 0
233749 MANIPUR 2006 Unemployed Male 60+ 1

558 rows × 6 columns

In [1125]:
t_MN_2006 = df_st_MN_2006.loc[:,"Total"]

s6_40 = np.sum(t_MN_2006)
s6_40
Out[1125]:
180
In [1126]:
df_st_MG_2006 = df_2006.loc[(df_2006["State"]=="MEGHALAYA")]

df_st_MG_2006
Out[1126]:
State Year Type Gender Age_group Total
132675 MEGHALAYA 2006 Death of Dear Person Female 30-44 0
132676 MEGHALAYA 2006 Divorce Female 15-29 0
132677 MEGHALAYA 2006 Drug Abuse/Addiction Male 0-14 0
132678 MEGHALAYA 2006 Failure in Examination Male 45-59 0
132679 MEGHALAYA 2006 Illness (Aids/STD) Male 45-59 0
... ... ... ... ... ... ...
233941 MEGHALAYA 2006 By Overdose of sleeping pills Female 30-44 0
233942 MEGHALAYA 2006 By Self Infliction of injury Female 30-44 0
233943 MEGHALAYA 2006 Farming/Agriculture Activity Female 45-59 0
233944 MEGHALAYA 2006 Others Male 45-59 1
233945 MEGHALAYA 2006 Retired Person Male 30-44 0

560 rows × 6 columns

In [1127]:
t_MG_2006 = df_st_MG_2006.loc[:,"Total"]

s6_41 = np.sum(t_MG_2006)
s6_41
Out[1127]:
459
In [1128]:
df_st_MZ_2006 = df_2006.loc[(df_2006["State"]=="MIZORAM")]

df_st_MZ_2006
Out[1128]:
State Year Type Gender Age_group Total
137758 MIZORAM 2006 Cancer Female 30-44 0
137759 MIZORAM 2006 Failure in Examination Male 60+ 0
137760 MIZORAM 2006 Love Affairs Male 60+ 0
137761 MIZORAM 2006 Paralysis Female 0-14 0
137762 MIZORAM 2006 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
... ... ... ... ... ... ...
234143 MIZORAM 2006 By Machine Male 0-14 0
234144 MIZORAM 2006 House Wife Male 0-14 0
234145 MIZORAM 2006 Professional Activity Female 15-29 0
234146 MIZORAM 2006 Public Sector Undertaking Female 15-29 0
234147 MIZORAM 2006 Married Female 0-100+ 7

561 rows × 6 columns

In [1129]:
t_MN_2006 = df_st_MN_2006.loc[:,"Total"]

s6_42 = np.sum(t_MN_2006)
s6_42
Out[1129]:
180
In [1130]:
df_st_NG_2006 = df_2006.loc[(df_2006["State"]=="NAGALAND")]

df_st_NG_2006
Out[1130]:
State Year Type Gender Age_group Total
142375 NAGALAND 2006 Divorce Male 60+ 0
142376 NAGALAND 2006 Drug Abuse/Addiction Male 15-29 1
142377 NAGALAND 2006 Fall in Social Reputation Female 30-44 0
142378 NAGALAND 2006 Illegitimate Pregnancy Male 15-29 0
142379 NAGALAND 2006 Love Affairs Female 45-59 0
... ... ... ... ... ... ...
234342 NAGALAND 2006 Others Female 60+ 0
234343 NAGALAND 2006 By touching electric wires Male 0-14 0
234344 NAGALAND 2006 Farming/Agriculture Activity Female 60+ 0
234345 NAGALAND 2006 Others Male 30-44 1
234346 NAGALAND 2006 Never Married Female 0-100+ 3

560 rows × 6 columns

In [1131]:
t_NG_2006 = df_st_NG_2006.loc[:,"Total"]

s6_43 = np.sum(t_NG_2006)
s6_43
Out[1131]:
140
In [1132]:
df_st_OD_2006 = df_2006.loc[(df_2006["State"]=="ODISHA")]

df_st_OD_2006
Out[1132]:
State Year Type Gender Age_group Total
148961 ODISHA 2006 Dowry Dispute Male 60+ 0
148962 ODISHA 2006 Drug Abuse/Addiction Male 45-59 0
148963 ODISHA 2006 Illness (Aids/STD) Male 0-14 0
148964 ODISHA 2006 Illness (Aids/STD) Male 45-59 2
148965 ODISHA 2006 Insanity/Mental Illness Female 60+ 5
... ... ... ... ... ... ...
234544 ODISHA 2006 Others Male 15-29 115
234545 ODISHA 2006 Others Male 45-59 88
234546 ODISHA 2006 Self-employed (Business activity) Male 15-29 58
234547 ODISHA 2006 Self-employed (Business activity) Male 30-44 118
234548 ODISHA 2006 Student Female 30-44 32

566 rows × 6 columns

In [1133]:
t_OD_2006 = df_st_OD_2006.loc[:,"Total"]

s6_44 = np.sum(t_OD_2006)
s6_44
Out[1133]:
20325
In [1134]:
df_st_PD_2006 = df_2006.loc[(df_2006["State"]=="PUDUCHERRY")]

df_st_PD_2006
Out[1134]:
State Year Type Gender Age_group Total
153420 PUDUCHERRY 2006 Causes Not known Female 45-59 0
153421 PUDUCHERRY 2006 Illegitimate Pregnancy Male 45-59 0
153422 PUDUCHERRY 2006 Love Affairs Male 0-14 0
153423 PUDUCHERRY 2006 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
153424 PUDUCHERRY 2006 Property Dispute Female 30-44 0
... ... ... ... ... ... ...
234769 PUDUCHERRY 2006 Public Sector Undertaking Male 30-44 1
234770 PUDUCHERRY 2006 Public Sector Undertaking Male 45-59 2
234771 PUDUCHERRY 2006 Self-employed (Business activity) Male 15-29 4
234772 PUDUCHERRY 2006 Self-employed (Business activity) Male 60+ 1
234773 PUDUCHERRY 2006 Service (Private) Male 45-59 15

560 rows × 6 columns

In [1135]:
t_PD_2006 = df_st_PD_2006.loc[:,"Total"]

s6_45 = np.sum(t_PD_2006)
s6_45
Out[1135]:
2630
In [1136]:
df_st_PB_2006 = df_2006.loc[(df_2006["State"]=="PUNJAB")]

df_st_PB_2006
Out[1136]:
State Year Type Gender Age_group Total
159987 PUNJAB 2006 Bankruptcy or Sudden change in Economic Male 0-14 0
159988 PUNJAB 2006 Drug Abuse/Addiction Male 60+ 3
159989 PUNJAB 2006 Not having Children(Barrenness/Impotency Male 60+ 0
159990 PUNJAB 2006 Unemployment Male 30-44 3
159991 PUNJAB 2006 Unemployment Male 45-59 1
... ... ... ... ... ... ...
234957 PUNJAB 2006 By Over Alcoholism Female 0-14 0
234958 PUNJAB 2006 By Overdose of sleeping pills Male 0-14 0
234959 PUNJAB 2006 By Self Infliction of injury Male 0-14 0
234960 PUNJAB 2006 Student Female 45-59 0
234961 PUNJAB 2006 Unemployed Female 45-59 0

566 rows × 6 columns

In [1137]:
t_PB_2006 = df_st_PB_2006.loc[:,"Total"]

s6_46 = np.sum(t_PB_2006)
s6_46
Out[1137]:
3860
In [1138]:
df_st_RJ_2006 = df_2006.loc[(df_2006["State"]=="RAJASTHAN")]

df_st_RJ_2006
Out[1138]:
State Year Type Gender Age_group Total
164642 RAJASTHAN 2006 Death of Dear Person Male 15-29 1
164643 RAJASTHAN 2006 Divorce Female 0-14 0
164644 RAJASTHAN 2006 Divorce Female 30-44 4
164645 RAJASTHAN 2006 Dowry Dispute Female 15-29 27
164646 RAJASTHAN 2006 Drug Abuse/Addiction Male 30-44 47
... ... ... ... ... ... ...
235164 RAJASTHAN 2006 Others Female 60+ 1
235165 RAJASTHAN 2006 Others Male 15-29 288
235166 RAJASTHAN 2006 Others Male 45-59 136
235167 RAJASTHAN 2006 Retired Person Male 45-59 2
235168 RAJASTHAN 2006 Self-employed (Business activity) Male 30-44 78

566 rows × 6 columns

In [1139]:
t_RJ_2006 = df_st_RJ_2006.loc[:,"Total"]

s6_47 = np.sum(t_RJ_2006)
s6_47
Out[1139]:
21315
In [1140]:
df_st_SM_2006 = df_2006.loc[(df_2006["State"]=="SIKKIM")]

df_st_SM_2006
Out[1140]:
State Year Type Gender Age_group Total
171482 SIKKIM 2006 Causes Not known Female 30-44 0
171483 SIKKIM 2006 Dowry Dispute Male 15-29 0
171484 SIKKIM 2006 Fall in Social Reputation Male 45-59 0
171485 SIKKIM 2006 Family Problems Male 30-44 0
171486 SIKKIM 2006 Ideological Causes/Hero Worshipping Male 15-29 0
... ... ... ... ... ... ...
235398 SIKKIM 2006 House Wife Female 30-44 10
235399 SIKKIM 2006 Others Female 30-44 0
235400 SIKKIM 2006 Service (Government) Male 0-14 0
235401 SIKKIM 2006 Unemployed Male 30-44 10
235402 SIKKIM 2006 Unemployed Male 45-59 8

558 rows × 6 columns

In [1141]:
t_SM_2006 = df_st_SM_2006.loc[:,"Total"]

s6_48 = np.sum(t_SM_2006)
s6_48
Out[1141]:
725
In [1142]:
df_st_TN_2006 = df_2006.loc[(df_2006["State"]=="TAMIL NADU")]

df_st_TN_2006
Out[1142]:
State Year Type Gender Age_group Total
175073 TAMIL NADU 2006 Bankruptcy or Sudden change in Economic Female 45-59 5
175074 TAMIL NADU 2006 Cancellation/Non-Settlement of Marriage Female 15-29 44
175075 TAMIL NADU 2006 Cancer Female 60+ 2
175076 TAMIL NADU 2006 Divorce Male 0-14 0
175077 TAMIL NADU 2006 Ideological Causes/Hero Worshipping Female 15-29 41
... ... ... ... ... ... ...
235617 TAMIL NADU 2006 Others Female 30-44 129
235618 TAMIL NADU 2006 Professional Activity Male 15-29 0
235619 TAMIL NADU 2006 Professional Activity Male 60+ 0
235620 TAMIL NADU 2006 Self-employed (Business activity) Male 0-14 0
235621 TAMIL NADU 2006 Unemployed Female 15-29 240

565 rows × 6 columns

In [1143]:
t_TN_2006 = df_st_TN_2006.loc[:,"Total"]

s6_49 = np.sum(t_TN_2006)
s6_49
Out[1143]:
61905
In [1144]:
df_st_TP_2006 = df_2006.loc[(df_2006["State"]=="TRIPURA")]

df_st_TP_2006
Out[1144]:
State Year Type Gender Age_group Total
181277 TRIPURA 2006 Bankruptcy or Sudden change in Economic Female 30-44 1
181278 TRIPURA 2006 Cancellation/Non-Settlement of Marriage Male 45-59 0
181279 TRIPURA 2006 Causes Not known Male 15-29 69
181280 TRIPURA 2006 Divorce Male 15-29 0
181281 TRIPURA 2006 Drug Abuse/Addiction Female 60+ 0
... ... ... ... ... ... ...
235836 TRIPURA 2006 By Self Infliction of injury Male 0-14 0
235837 TRIPURA 2006 By touching electric wires Female 15-29 0
235838 TRIPURA 2006 Others Male 15-29 82
235839 TRIPURA 2006 Unemployed Female 0-14 0
235840 TRIPURA 2006 Unemployed Male 45-59 3

566 rows × 6 columns

In [1145]:
t_TP_2006 = df_st_TP_2006.loc[:,"Total"]

s6_50 = np.sum(t_TP_2006)
s6_50
Out[1145]:
3825
In [1146]:
df_st_UP_2006 = df_2006.loc[(df_2006["State"]=="UTTAR PRADESH")]

df_st_UP_2006
Out[1146]:
State Year Type Gender Age_group Total
185608 UTTAR PRADESH 2006 Cancellation/Non-Settlement of Marriage Male 60+ 0
185609 UTTAR PRADESH 2006 Illegitimate Pregnancy Female 0-14 0
185610 UTTAR PRADESH 2006 Illness (Aids/STD) Female 60+ 3
185611 UTTAR PRADESH 2006 Others Male 0-14 7
185612 UTTAR PRADESH 2006 Property Dispute Male 60+ 0
... ... ... ... ... ... ...
236018 UTTAR PRADESH 2006 Others Male 15-29 204
236019 UTTAR PRADESH 2006 By Over Alcoholism Male 15-29 13
236020 UTTAR PRADESH 2006 By touching electric wires Male 60+ 4
236021 UTTAR PRADESH 2006 Professional Activity Female 30-44 3
236022 UTTAR PRADESH 2006 Unemployed Male 30-44 116

566 rows × 6 columns

In [1147]:
t_UP_2006 = df_st_UP_2006.loc[:,"Total"]

s6_51 = np.sum(t_UP_2006)
s6_51
Out[1147]:
15495
In [1148]:
df_st_UK_2006 = df_2006.loc[(df_2006["State"]=="UTTARAKHAND")]

df_st_UK_2006
Out[1148]:
State Year Type Gender Age_group Total
192226 UTTARAKHAND 2006 Drug Abuse/Addiction Male 60+ 0
192227 UTTARAKHAND 2006 Illness (Aids/STD) Male 45-59 0
192228 UTTARAKHAND 2006 Insanity/Mental Illness Female 15-29 3
192229 UTTARAKHAND 2006 Other Prolonged Illness Male 0-14 0
192230 UTTARAKHAND 2006 Physical Abuse (Rape/Incest Etc.) Male 0-14 0
... ... ... ... ... ... ...
236234 UTTARAKHAND 2006 Post Graduate and Above Male 0-100+ 3
236235 UTTARAKHAND 2006 By Fire/Self Immolation Female 15-29 11
236236 UTTARAKHAND 2006 By Jumping from (Other sites) Female 30-44 0
236237 UTTARAKHAND 2006 By Over Alcoholism Female 15-29 0
236238 UTTARAKHAND 2006 By Over Alcoholism Female 60+ 0

563 rows × 6 columns

In [1149]:
t_UK_2006 = df_st_UK_2006.loc[:,"Total"]

s6_52 = np.sum(t_UK_2006)
s6_52
Out[1149]:
1630
In [1150]:
df_st_WB_2006 = df_2006.loc[(df_2006["State"]=="WEST BENGAL")]

df_st_WB_2006
Out[1150]:
State Year Type Gender Age_group Total
197436 WEST BENGAL 2006 Cancellation/Non-Settlement of Marriage Male 60+ 0
197437 WEST BENGAL 2006 Causes Not known Female 0-14 15
197438 WEST BENGAL 2006 Illegitimate Pregnancy Female 60+ 0
197439 WEST BENGAL 2006 Illegitimate Pregnancy Male 45-59 0
197440 WEST BENGAL 2006 Other Prolonged Illness Male 45-59 132
... ... ... ... ... ... ...
236479 WEST BENGAL 2006 By Jumping from (Other sites) Male 15-29 67
236480 WEST BENGAL 2006 By touching electric wires Female 0-14 0
236481 WEST BENGAL 2006 House Wife Male 15-29 0
236482 WEST BENGAL 2006 Self-employed (Business activity) Male 0-14 0
236483 WEST BENGAL 2006 Service (Government) Male 60+ 0

565 rows × 6 columns

In [1151]:
t_WB_2006 = df_st_WB_2006.loc[:,"Total"]

s6_53 = np.sum(t_WB_2006)
s6_53
Out[1151]:
78625
In [1152]:
t_ANm_2006 = np.sum(df_st_AN_2006.where(df_st_AN_2006["Gender"]=="Male")["Total"])
t_ANm_2006
Out[1152]:
480.0
In [1153]:
t_ANfm_2006 = np.sum(df_st_AN_2006.where(df_st_AN_2006["Gender"]=="Female")["Total"])
t_ANfm_2006
Out[1153]:
185.0
In [1154]:
t_APm_2006 = np.sum(df_st_AP_2006.where(df_st_AP_2006["Gender"]=="Male")["Total"])
t_APm_2006
Out[1154]:
44315.0
In [1155]:
t_APfm_2006 = np.sum(df_st_AP_2006.where(df_st_AP_2006["Gender"]=="Female")["Total"])
t_APfm_2006
Out[1155]:
22065.0
In [1156]:
t_ARPm_2006 = np.sum(df_st_ARP_2006.where(df_st_ARP_2006["Gender"]=="Male")["Total"])
t_ARPm_2006
Out[1156]:
480.0
In [1157]:
t_ARPfm_2006 = np.sum(df_st_ARP_2006.where(df_st_ARP_2006["Gender"]=="Female")["Total"])
t_ARPfm_2006
Out[1157]:
165.0
In [1158]:
t_ASm_2006 = np.sum(df_st_AS_2006.where(df_st_AS_2006["Gender"]=="Male")["Total"])
t_ASm_2006
Out[1158]:
10580.0
In [1159]:
t_ASfm_2006 = np.sum(df_st_AS_2006.where(df_st_AS_2006["Gender"]=="Female")["Total"])
t_ASfm_2006
Out[1159]:
4575.0
In [1160]:
t_BHm_2006 = np.sum(df_st_BH_2006.where(df_st_BH_2006["Gender"]=="Male")["Total"])
t_BHm_2006
Out[1160]:
1495.0
In [1161]:
t_BHfm_2006 = np.sum(df_st_BH_2006.where(df_st_BH_2006["Gender"]=="Female")["Total"])
t_BHfm_2006
Out[1161]:
1595.0
In [1162]:
t_CHm_2006 = np.sum(df_st_CH_2006.where(df_st_CH_2006["Gender"]=="Male")["Total"])
t_CHm_2006
Out[1162]:
280.0
In [1163]:
t_CHfm_2006 = np.sum(df_st_CH_2006.where(df_st_CH_2006["Gender"]=="Female")["Total"])
t_CHfm_2006
Out[1163]:
120.0
In [1164]:
t_CTm_2006 = np.sum(df_st_CT_2006.where(df_st_CT_2006["Gender"]=="Male")["Total"])
t_CTm_2006
Out[1164]:
15300.0
In [1165]:
t_CTfm_2006 = np.sum(df_st_CT_2006.where(df_st_CT_2006["Gender"]=="Female")["Total"])
t_CTfm_2006
Out[1165]:
7830.0
In [1166]:
t_DNm_2006 = np.sum(df_st_DN_2006.where(df_st_DN_2006["Gender"]=="Male")["Total"])
t_DNm_2006
Out[1166]:
115.0
In [1167]:
t_DNfm_2006 = np.sum(df_st_DN_2006.where(df_st_DN_2006["Gender"]=="Female")["Total"])
t_DNfm_2006
Out[1167]:
95.0
In [1168]:
t_DDm_2006 = np.sum(df_st_DD_2006.where(df_st_DD_2006["Gender"]=="Male")["Total"])
t_DDm_2006
Out[1168]:
70.0
In [1169]:
t_DDfm_2006 = np.sum(df_st_DD_2006.where(df_st_DD_2006["Gender"]=="Female")["Total"])
t_DDfm_2006
Out[1169]:
40.0
In [1170]:
t_DLm_2006 = np.sum(df_st_DL_2006.where(df_st_DL_2006["Gender"]=="Male")["Total"])
t_DLm_2006
Out[1170]:
4800.0
In [1171]:
t_DLfm_2006 = np.sum(df_st_DL_2006.where(df_st_DL_2006["Gender"]=="Female")["Total"])
t_DLfm_2006
Out[1171]:
2658.0
In [1172]:
t_GOAm_2006 = np.sum(df_st_GOA_2006.where(df_st_GOA_2006["Gender"]=="Male")["Total"])
t_GOAm_2006
Out[1172]:
915.0
In [1173]:
t_GOAfm_2006 = np.sum(df_st_GOA_2006.where(df_st_GOA_2006["Gender"]=="Female")["Total"])
t_GOAfm_2006
Out[1173]:
460.0
In [1174]:
t_GJm_2006 = np.sum(df_st_GJ_2006.where(df_st_GJ_2006["Gender"]=="Male")["Total"])
t_GJm_2006
Out[1174]:
15240.0
In [1175]:
t_GJfm_2006 = np.sum(df_st_GJ_2006.where(df_st_GJ_2006["Gender"]=="Female")["Total"])
t_GJfm_2006
Out[1175]:
9932.0
In [1176]:
t_HRm_2006 = np.sum(df_st_HR_2006.where(df_st_HR_2006["Gender"]=="Male")["Total"])
t_HRm_2006
Out[1176]:
8830.0
In [1177]:
t_HRfm_2006 = np.sum(df_st_HR_2006.where(df_st_HR_2006["Gender"]=="Female")["Total"])
t_HRfm_2006
Out[1177]:
2750.0
In [1178]:
t_HPm_2006 = np.sum(df_st_HP_2006.where(df_st_HP_2006["Gender"]=="Male")["Total"])
t_HPm_2006
Out[1178]:
1505.0
In [1179]:
t_HPfm_2006 = np.sum(df_st_HP_2006.where(df_st_HP_2006["Gender"]=="Female")["Total"])
t_HPfm_2006
Out[1179]:
780.0
In [1180]:
t_JKm_2006 = np.sum(df_st_JK_2006.where(df_st_JK_2006["Gender"]=="Male")["Total"])
t_JKm_2006
Out[1180]:
759.0
In [1181]:
t_JKfm_2006 = np.sum(df_st_JK_2006.where(df_st_JK_2006["Gender"]=="Female")["Total"])
t_JKfm_2006
Out[1181]:
542.0
In [1182]:
t_JHm_2006 = np.sum(df_st_JH_2006.where(df_st_JH_2006["Gender"]=="Male")["Total"])
t_JHm_2006
Out[1182]:
2605.0
In [1183]:
t_JHfm_2006 = np.sum(df_st_JH_2006.where(df_st_JH_2006["Gender"]=="Female")["Total"])
t_JHfm_2006
Out[1183]:
1675.0
In [1184]:
t_KNm_2006 = np.sum(df_st_KN_2006.where(df_st_KN_2006["Gender"]=="Male")["Total"])
t_KNm_2006
Out[1184]:
40240.0
In [1185]:
t_KNfm_2006 = np.sum(df_st_KN_2006.where(df_st_KN_2006["Gender"]=="Female")["Total"])
t_KNfm_2006
Out[1185]:
20820.0
In [1186]:
t_KERm_2006 = np.sum(df_st_KER_2006.where(df_st_KER_2006["Gender"]=="Male")["Total"])
t_KERm_2006
Out[1186]:
32915.0
In [1187]:
t_KERfm_2006 = np.sum(df_st_KER_2006.where(df_st_KER_2006["Gender"]=="Female")["Total"])
t_KERfm_2006
Out[1187]:
12215.0
In [1188]:
t_LDm_2006 = np.sum(df_st_LD_2006.where(df_st_LD_2006["Gender"]=="Male")["Total"])
t_LDm_2006
Out[1188]:
5.0
In [1189]:
t_LDfm_2006 = np.sum(df_st_LD_2006.where(df_st_LD_2006["Gender"]=="Female")["Total"])
t_LDfm_2006
Out[1189]:
5.0
In [1190]:
t_MPm_2006 = np.sum(df_st_MP_2006.where(df_st_MP_2006["Gender"]=="Male")["Total"])
t_MPm_2006
Out[1190]:
17515.0
In [1191]:
t_MPfm_2006 = np.sum(df_st_MP_2006.where(df_st_MP_2006["Gender"]=="Female")["Total"])
t_MPfm_2006
Out[1191]:
14660.0
In [1192]:
t_MHm_2006 = np.sum(df_st_MH_2006.where(df_st_MH_2006["Gender"]=="Male")["Total"])
t_MHm_2006
Out[1192]:
52550.0
In [1193]:
t_MHfm_2006 = np.sum(df_st_MH_2006.where(df_st_MH_2006["Gender"]=="Female")["Total"])
t_MHfm_2006
Out[1193]:
24920.0
In [1194]:
t_MNm_2006 = np.sum(df_st_MN_2006.where(df_st_MN_2006["Gender"]=="Male")["Total"])
t_MNm_2006
Out[1194]:
120.0
In [1195]:
t_MNfm_2006 = np.sum(df_st_MN_2006.where(df_st_MN_2006["Gender"]=="Female")["Total"])
t_MNfm_2006
Out[1195]:
60.0
In [1196]:
t_MGm_2006 = np.sum(df_st_MG_2006.where(df_st_MG_2006["Gender"]=="Male")["Total"])
t_MGm_2006
Out[1196]:
344.0
In [1197]:
t_MGfm_2006 = np.sum(df_st_MG_2006.where(df_st_MG_2006["Gender"]=="Female")["Total"])
t_MGfm_2006
Out[1197]:
115.0
In [1198]:
t_MZm_2006 = np.sum(df_st_MZ_2006.where(df_st_MZ_2006["Gender"]=="Male")["Total"])
t_MZm_2006
Out[1198]:
298.0
In [1199]:
t_MZfm_2006 = np.sum(df_st_MZ_2006.where(df_st_MZ_2006["Gender"]=="Female")["Total"])
t_MZfm_2006
Out[1199]:
50.0
In [1200]:
t_NGm_2006 = np.sum(df_st_NG_2006.where(df_st_NG_2006["Gender"]=="Male")["Total"])
t_NGm_2006
Out[1200]:
95.0
In [1201]:
t_NGfm_2006 = np.sum(df_st_NG_2006.where(df_st_NG_2006["Gender"]=="Female")["Total"])
t_MGfm_2006
Out[1201]:
115.0
In [1202]:
t_ODm_2006 = np.sum(df_st_OD_2006.where(df_st_OD_2006["Gender"]=="Male")["Total"])
t_ODm_2006
Out[1202]:
11865.0
In [1203]:
t_ODfm_2006 = np.sum(df_st_OD_2006.where(df_st_OD_2006["Gender"]=="Female")["Total"])
t_ODfm_2006
Out[1203]:
8460.0
In [1204]:
t_PDm_2006 = np.sum(df_st_PD_2006.where(df_st_PD_2006["Gender"]=="Male")["Total"])
t_PDm_2006
Out[1204]:
1745.0
In [1205]:
t_PDfm_2006 = np.sum(df_st_PD_2006.where(df_st_PD_2006["Gender"]=="Female")["Total"])
t_PDfm_2006
Out[1205]:
885.0
In [1206]:
t_PBm_2006 = np.sum(df_st_PB_2006.where(df_st_PB_2006["Gender"]=="Male")["Total"])
t_PBm_2006
Out[1206]:
3050.0
In [1207]:
t_PBfm_2006 = np.sum(df_st_PB_2006.where(df_st_PB_2006["Gender"]=="Female")["Total"])
t_PBfm_2006
Out[1207]:
810.0
In [1208]:
t_RJm_2006 = np.sum(df_st_RJ_2006.where(df_st_RJ_2006["Gender"]=="Male")["Total"])
t_RJm_2006
Out[1208]:
14550.0
In [1209]:
t_RJfm_2006 = np.sum(df_st_RJ_2006.where(df_st_RJ_2006["Gender"]=="Female")["Total"])
t_RJfm_2006
Out[1209]:
6765.0
In [1210]:
t_SMm_2006 = np.sum(df_st_SM_2006.where(df_st_SM_2006["Gender"]=="Male")["Total"])
t_SMm_2006
Out[1210]:
490.0
In [1211]:
t_SMfm_2006 = np.sum(df_st_SM_2006.where(df_st_SM_2006["Gender"]=="Female")["Total"])
t_SMfm_2006
Out[1211]:
235.0
In [1212]:
t_TNm_2006 = np.sum(df_st_TN_2006.where(df_st_TN_2006["Gender"]=="Male")["Total"])
t_TNm_2006
Out[1212]:
37545.0
In [1213]:
t_TNfm_2006 = np.sum(df_st_TN_2006.where(df_st_TN_2006["Gender"]=="Female")["Total"])
t_TNfm_2006
Out[1213]:
24360.0
In [1214]:
t_TPm_2006 = np.sum(df_st_TP_2006.where(df_st_TP_2006["Gender"]=="Male")["Total"])
t_TPm_2006
Out[1214]:
2140.0
In [1215]:
t_TPfm_2006 = np.sum(df_st_TP_2006.where(df_st_TP_2006["Gender"]=="Female")["Total"])
t_TPfm_2006
Out[1215]:
1685.0
In [1216]:
t_UPm_2006 = np.sum(df_st_UP_2006.where(df_st_UP_2006["Gender"]=="Male")["Total"])
t_UPm_2006
Out[1216]:
8805.0
In [1217]:
t_UPfm_2006 = np.sum(df_st_UP_2006.where(df_st_UP_2006["Gender"]=="Female")["Total"])
t_UPfm_2006
Out[1217]:
6690.0
In [1218]:
t_UKm_2006 = np.sum(df_st_UK_2006.where(df_st_UK_2006["Gender"]=="Male")["Total"])
t_UKm_2006
Out[1218]:
865.0
In [1219]:
t_UKfm_2006 = np.sum(df_st_UK_2006.where(df_st_UK_2006["Gender"]=="Female")["Total"])
t_UKfm_2006
Out[1219]:
765.0
In [1220]:
t_WBm_2006 = np.sum(df_st_WB_2006.where(df_st_WB_2006["Gender"]=="Male")["Total"])
t_WBm_2006
Out[1220]:
45600.0
In [1221]:
t_WBfm_2006 = np.sum(df_st_WB_2006.where(df_st_WB_2006["Gender"]=="Female")["Total"])
t_WBfm_2006
Out[1221]:
33025.0
In [1222]:
l_2006=list(df_2006.loc[:,"Type"].unique())
l_2006.sort()
print(l_2006,end=" ")
['Bankruptcy or Sudden change in Economic', 'By Consuming Insecticides', 'By Consuming Other Poison', 'By Drowning', 'By Fire-Arms', 'By Fire/Self Immolation', 'By Hanging', 'By Jumping from (Building)', 'By Jumping from (Other sites)', 'By Jumping off Moving Vehicles/Trains', 'By Machine', 'By Over Alcoholism', 'By Overdose of sleeping pills', 'By Self Infliction of injury', 'By coming under running vehicles/trains', 'By touching electric wires', 'Cancellation/Non-Settlement of Marriage', 'Cancer', 'Causes Not known', 'Death of Dear Person', 'Diploma', 'Divorce', 'Divorcee', 'Dowry Dispute', 'Drug Abuse/Addiction', 'Failure in Examination', 'Fall in Social Reputation', 'Family Problems', 'Farming/Agriculture Activity', 'Graduate', 'House Wife', 'Hr. Secondary/Intermediate/Pre-Universit', 'Ideological Causes/Hero Worshipping', 'Illegitimate Pregnancy', 'Illness (Aids/STD)', 'Insanity/Mental Illness', 'Love Affairs', 'Married', 'Matriculate/Secondary', 'Middle', 'Never Married', 'No Education', 'Not having Children(Barrenness/Impotency', 'Other Prolonged Illness', 'Others', 'Paralysis', 'Physical Abuse (Rape/Incest Etc.)', 'Post Graduate and Above', 'Poverty', 'Primary', 'Professional Activity', 'Professional/Career Problem', 'Property Dispute', 'Public Sector Undertaking', 'Retired Person', 'Self-employed (Business activity)', 'Seperated', 'Service (Government)', 'Service (Private)', 'Student', 'Suspected/Illicit Relation', 'Unemployed', 'Unemployment', 'Widowed/Widower'] 
In [1223]:
cause_l_2006=[]
for i in l_2006:
    rough= np.sum(df_2006.where(df_2006["Type"]==i)["Total"])
    cause_l_2006.append(rough)

print(cause_l_2006,end=" ")
[3320.0, 22947.0, 18733.0, 8579.0, 353.0, 10243.0, 38706.0, 516.0, 867.0, 886.0, 117.0, 1256.0, 784.0, 216.0, 3822.0, 601.0, 865.0, 747.0, 17159.0, 879.0, 1037.0, 394.0, 1102.0, 2336.0, 2188.0, 2378.0, 1345.0, 30771.0, 17060.0, 2199.0, 25063.0, 10411.0, 289.0, 267.0, 793.0, 8045.0, 4064.0, 85321.0, 21454.0, 28977.0, 24419.0, 25165.0, 642.0, 16497.0, 60708.0, 537.0, 315.0, 366.0, 2643.0, 28503.0, 3643.0, 1091.0, 2244.0, 2401.0, 1119.0, 6934.0, 2646.0, 2147.0, 9041.0, 5857.0, 1134.0, 8886.0, 1891.0, 4624.0] 
In [1224]:
x1_2006 = set(df_2006.loc[:,"State"])
x1_2006
len(x1_2006)
Out[1224]:
35
In [1225]:
cause_df_2006 = pd.DataFrame(cause_l_2006,l_2006)
cause_df_2006.reset_index()
Out[1225]:
index 0
0 Bankruptcy or Sudden change in Economic 3320.0
1 By Consuming Insecticides 22947.0
2 By Consuming Other Poison 18733.0
3 By Drowning 8579.0
4 By Fire-Arms 353.0
... ... ...
59 Student 5857.0
60 Suspected/Illicit Relation 1134.0
61 Unemployed 8886.0
62 Unemployment 1891.0
63 Widowed/Widower 4624.0

64 rows × 2 columns

In [1226]:
cause_df_2006.plot.bar(stacked=True,figsize=(50,20))
plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("Causes",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths due to Different Causes in 2006",fontsize=55)
plt.legend(["Death Count"], prop={"size":30})
Out[1226]:
<matplotlib.legend.Legend at 0x10d80b08>
In [1227]:
s_2006=list(df_2006.loc[:,"State"].unique())
s_2006.sort()
print(s_2006,end=" ")
['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH', 'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR', 'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA', 'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA', 'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'] 
In [1228]:
state_s_2006 = [s6_19,s6_20,s6_21,s6_22,s6_23,s6_24,s6_25,s6_26,s6_27,s6_28,s6_29,s6_30,s6_31,s6_32,s6_33,s6_34,
           s6_35,s6_36,s6_37,s6_38,s6_39,s6_40,s6_41,s6_42,s6_43,s6_44,s6_45,s6_46,s6_47,s6_48,s6_49,s6_50,
           s6_51,s6_52,s6_53]
print(state_s_2006,end=" ")
[665, 66380, 645, 15155, 3090, 400, 23130, 210, 110, 7458, 1375, 25172, 11580, 2285, 1301, 4280, 61060, 45130, 10, 32175, 77470, 180, 459, 180, 140, 20325, 2630, 3860, 21315, 725, 61905, 3825, 15495, 1630, 78625] 
In [1229]:
state_m_2006=[t_ANm_2006, t_APm_2006, t_ARPm_2006, t_ASm_2006, t_BHm_2006, t_CHm_2006, t_CTm_2006, t_DNm_2006,
             t_DDm_2006, t_DLm_2006, t_GOAm_2006, t_GJm_2006, t_HRm_2006, t_HPm_2006,t_JKm_2006, t_JHm_2006,
             t_KNm_2006, t_KERm_2006, t_LDm_2006,t_MPm_2006,t_MHm_2006,t_MNm_2006,t_MGm_2006,t_MZm_2006,
             t_NGm_2006, t_ODm_2006, t_PDm_2006,t_PBm_2006,t_RJm_2006,t_SMm_2006,t_TNm_2006,t_TPm_2006,
             t_UPm_2006, t_UKm_2006, t_WBm_2006]
print(state_m_2006,end=" ")
[480.0, 44315.0, 480.0, 10580.0, 1495.0, 280.0, 15300.0, 115.0, 70.0, 4800.0, 915.0, 15240.0, 8830.0, 1505.0, 759.0, 2605.0, 40240.0, 32915.0, 5.0, 17515.0, 52550.0, 120.0, 344.0, 298.0, 95.0, 11865.0, 1745.0, 3050.0, 14550.0, 490.0, 37545.0, 2140.0, 8805.0, 865.0, 45600.0] 
In [1230]:
state_fm_2006=[t_ANfm_2006, t_APfm_2006, t_ARPfm_2006, t_ASfm_2006, t_BHfm_2006, t_CHfm_2006, t_CTfm_2006, t_DNfm_2006,
             t_DDfm_2006, t_DLfm_2006, t_GOAfm_2006, t_GJfm_2006, t_HRfm_2006, t_HPfm_2006,t_JKfm_2006, t_JHfm_2006,
             t_KNfm_2006, t_KERfm_2006, t_LDfm_2006,t_MPfm_2006,t_MHfm_2006,t_MNfm_2006,t_MGfm_2006,t_MZfm_2006,
             t_NGfm_2006, t_ODfm_2006, t_PDfm_2006,t_PBfm_2006,t_RJfm_2006,t_SMfm_2006,t_TNfm_2006,t_TPfm_2006,
             t_UPfm_2006, t_UKfm_2006, t_WBfm_2006]
print(state_fm_2006,end=" ")
[185.0, 22065.0, 165.0, 4575.0, 1595.0, 120.0, 7830.0, 95.0, 40.0, 2658.0, 460.0, 9932.0, 2750.0, 780.0, 542.0, 1675.0, 20820.0, 12215.0, 5.0, 14660.0, 24920.0, 60.0, 115.0, 50.0, 45.0, 8460.0, 885.0, 810.0, 6765.0, 235.0, 24360.0, 1685.0, 6690.0, 765.0, 33025.0] 
In [1231]:
df_state_2006 = {
    
    "State":['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH',
             'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR',
             'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA',
             'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA',
             'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'],
                   
    "Total":[s6_19,s6_20,s6_21,s6_22,s6_23,s6_24,s6_25,s6_26,s6_27,s6_28,s6_29,s6_30,s6_31,s6_32,s6_33,s6_34,
           s6_35,s6_36,s6_37,s6_38,s6_39,s6_40,s6_41,s6_42,s6_43,s6_44,s6_45,s6_46,s6_47,s6_48,s6_49,s6_50,
           s6_51,s6_52,s6_53],
       
    "Male":[t_ANm_2006, t_APm_2006, t_ARPm_2006, t_ASm_2006, t_BHm_2006, t_CHm_2006, t_CTm_2006, t_DNm_2006,
             t_DDm_2006, t_DLm_2006, t_GOAm_2006, t_GJm_2006, t_HRm_2006, t_HPm_2006,t_JKm_2006, t_JHm_2006,
             t_KNm_2006, t_KERm_2006, t_LDm_2006,t_MPm_2006,t_MHm_2006,t_MNm_2006,t_MGm_2006,t_MZm_2006,
             t_NGm_2006, t_ODm_2006, t_PDm_2006,t_PBm_2006,t_RJm_2006,t_SMm_2006,t_TNm_2006,t_TPm_2006,
             t_UPm_2006, t_UKm_2006, t_WBm_2006],
                 
    "Female":[t_ANfm_2006, t_APfm_2006, t_ARPfm_2006, t_ASfm_2006, t_BHfm_2006, t_CHfm_2006, t_CTfm_2006, t_DNfm_2006,
             t_DDfm_2006, t_DLfm_2006, t_GOAfm_2006, t_GJfm_2006, t_HRfm_2006, t_HPfm_2006,t_JKfm_2006, t_JHfm_2006,
             t_KNfm_2006, t_KERfm_2006, t_LDfm_2006,t_MPfm_2006,t_MHfm_2006,t_MNfm_2006,t_MGfm_2006,t_MZfm_2006,
             t_NGfm_2006, t_ODfm_2006, t_PDfm_2006,t_PBfm_2006,t_RJfm_2006,t_SMfm_2006,t_TNfm_2006,t_TPfm_2006,
             t_UPfm_2006, t_UKfm_2006, t_WBfm_2006]
                  

}

df_All_st_2006 = pd.DataFrame(df_state_2006)
df_All_st_2006
Out[1231]:
State Total Male Female
0 A & N ISLANDS 665 480.0 185.0
1 ANDHRA PRADESH 66380 44315.0 22065.0
2 ARUNACHAL PRADESH 645 480.0 165.0
3 ASSAM 15155 10580.0 4575.0
4 BIHAR 3090 1495.0 1595.0
5 CHANDIGARH 400 280.0 120.0
6 CHHATTISGARH 23130 15300.0 7830.0
7 D & N HAVELI 210 115.0 95.0
8 DAMAN & DIU 110 70.0 40.0
9 DELHI (UT) 7458 4800.0 2658.0
10 GOA 1375 915.0 460.0
11 GUJARAT 25172 15240.0 9932.0
12 HARYANA 11580 8830.0 2750.0
13 HIMACHAL PRADESH 2285 1505.0 780.0
14 JAMMU & KASHMIR 1301 759.0 542.0
15 JHARKHAND 4280 2605.0 1675.0
16 KARNATAKA 61060 40240.0 20820.0
17 KERALA 45130 32915.0 12215.0
18 LAKSHADWEEP 10 5.0 5.0
19 MADHYA PRADESH 32175 17515.0 14660.0
20 MAHARASHTRA 77470 52550.0 24920.0
21 MANIPUR 180 120.0 60.0
22 MEGHALAYA 459 344.0 115.0
23 MIZORAM 180 298.0 50.0
24 NAGALAND 140 95.0 45.0
25 ODISHA 20325 11865.0 8460.0
26 PUDUCHERRY 2630 1745.0 885.0
27 PUNJAB 3860 3050.0 810.0
28 RAJASTHAN 21315 14550.0 6765.0
29 SIKKIM 725 490.0 235.0
30 TAMIL NADU 61905 37545.0 24360.0
31 TRIPURA 3825 2140.0 1685.0
32 UTTAR PRADESH 15495 8805.0 6690.0
33 UTTARAKHAND 1630 865.0 765.0
34 WEST BENGAL 78625 45600.0 33025.0
In [1232]:
pivot_2006 = pd.pivot_table(df_All_st_2006, values=None, index='State', columns=None,
                       fill_value=None, margins=False, dropna=True, margins_name='All', observed=False)

pivot_2006
Out[1232]:
Female Male Total
State
A & N ISLANDS 185.0 480.0 665
ANDHRA PRADESH 22065.0 44315.0 66380
ARUNACHAL PRADESH 165.0 480.0 645
ASSAM 4575.0 10580.0 15155
BIHAR 1595.0 1495.0 3090
CHANDIGARH 120.0 280.0 400
CHHATTISGARH 7830.0 15300.0 23130
D & N HAVELI 95.0 115.0 210
DAMAN & DIU 40.0 70.0 110
DELHI (UT) 2658.0 4800.0 7458
GOA 460.0 915.0 1375
GUJARAT 9932.0 15240.0 25172
HARYANA 2750.0 8830.0 11580
HIMACHAL PRADESH 780.0 1505.0 2285
JAMMU & KASHMIR 542.0 759.0 1301
JHARKHAND 1675.0 2605.0 4280
KARNATAKA 20820.0 40240.0 61060
KERALA 12215.0 32915.0 45130
LAKSHADWEEP 5.0 5.0 10
MADHYA PRADESH 14660.0 17515.0 32175
MAHARASHTRA 24920.0 52550.0 77470
MANIPUR 60.0 120.0 180
MEGHALAYA 115.0 344.0 459
MIZORAM 50.0 298.0 180
NAGALAND 45.0 95.0 140
ODISHA 8460.0 11865.0 20325
PUDUCHERRY 885.0 1745.0 2630
PUNJAB 810.0 3050.0 3860
RAJASTHAN 6765.0 14550.0 21315
SIKKIM 235.0 490.0 725
TAMIL NADU 24360.0 37545.0 61905
TRIPURA 1685.0 2140.0 3825
UTTAR PRADESH 6690.0 8805.0 15495
UTTARAKHAND 765.0 865.0 1630
WEST BENGAL 33025.0 45600.0 78625
In [1233]:
pivot_2006.plot(kind='bar',figsize=(60,30))

plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("States",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths of Males And Females In Different State",fontsize=55)
plt.legend(["Female","Male","Total"], prop={"size":30})

plt.show
Out[1233]:
<function matplotlib.pyplot.show(close=None, block=None)>
In [1234]:
cause_l_percent_2006=[]
for i in cause_l_2006:
    p=i/np.sum(cause_l_2006)
    avg_2006_cause=p*100
    cause_l_percent_2006.append(avg_2006_cause)

print(cause_l_percent_2006,end=" ")
[0.562194454933849, 3.885745830532239, 3.172165278396323, 1.4527307918305694, 0.05977549475652069, 1.7345053620142818, 6.554306798996855, 0.08737721046562232, 0.14681403386374914, 0.15003141176849105, 0.01981227446604227, 0.21268561307135975, 0.13275917249040292, 0.03657650670653958, 0.6472009658907142, 0.10177074319736243, 0.14647536250535523, 0.12649375236011604, 2.905630919340336, 0.14884606201411243, 0.17560109932722937, 0.06671825760359533, 0.1866079184750306, 0.3955681466040576, 0.3705064660829101, 0.4026802451303292, 0.2277564885198876, 5.210628184569117, 2.8888666870998385, 0.3723691585540765, 4.244060127712969, 1.7629537561193682, 0.04893801128791638, 0.045212626345583644, 0.1342831936031754, 1.362305539139402, 0.6881802002563742, 14.44788948476233, 3.632927661491204, 4.9068399760898025, 4.135007950310139, 4.261332366991057, 0.10871350604443708, 2.79353069971196, 10.280030412687983, 0.0909332597287581, 0.05334073894703688, 0.06197685858608094, 0.447554200117519, 4.826574864150452, 0.6168898793144614, 0.18474522600386423, 0.37998926411793893, 0.40657496575185886, 0.18948662502137864, 1.174173599551599, 0.44806220715510975, 0.3635637032358355, 1.530963875619557, 0.9917990730564921, 0.19202666020933276, 1.5047168453440307, 0.3202137693614182, 0.7830081806066621] 
In [1235]:
np.max(cause_l_percent_2006) #Married
Out[1235]:
14.44788948476233
In [1236]:
np.min(cause_l_percent_2006)  #Ideological Causes/Hero Worshipping
Out[1236]:
0.01981227446604227
In [1237]:
state_s_2006_percent=[]
tot=np.sum(state_s_2006)
for i in state_s_2006:
    xy=i/tot
    avg_state_2006=xy*100
    state_s_2006_percent.append(avg_state_2006)

print(state_s_2006_percent,end=" ")
[0.1126402710141859, 11.24370103747618, 0.109252593690451, 2.5670124920601314, 0.5233961465170442, 0.06775354647469828, 3.917848824899428, 0.0355706118992166, 0.01863222528054203, 1.2632648740207495, 0.23290281600677537, 4.263730679652763, 1.9614651704425154, 0.38704213423671396, 0.22036840990895618, 0.7249629472792717, 10.342578869362693, 7.644293881007834, 0.0016938386618674571, 5.449925894558543, 13.12216811348719, 0.03048909591361423, 0.07774719457971628, 0.03048909591361423, 0.0237137412661444, 3.4427270802456063, 0.4454795680711412, 0.6538217234808384, 3.6104171077704845, 0.12280330298539063, 10.485708236290494, 0.6478932881643024, 2.6246030065636248, 0.27609570188439553, 13.31780647893288] 
In [1238]:
np.max(state_s_2006_percent) #Maharashtra
Out[1238]:
13.31780647893288
In [1239]:
np.min(state_s_2006_percent)  #Lakshdweep
Out[1239]:
0.0016938386618674571
In [1240]:
l_age_grp_2006=[s6_4,s6_5,s6_6,s6_7,s6_8,s6_54]
l_age_grp_2006
Out[1240]:
[7389, 126640, 122097, 70815, 27378, 236224]
In [1241]:
l_age_grp_2006_percent=[]
for i in l_age_grp_2006:
    yz=i/s6_1
    avg_2006_age_grp=yz*100
    l_age_grp_2006_percent.append(avg_2006_age_grp)
l_age_grp_2006_percent
Out[1241]:
[1.251221333586208,
 21.444670413500795,
 20.675378422909084,
 11.991506122331481,
 4.636072225053891,
 40.00115148261854]
In [1242]:
np.max(l_age_grp_2006_percent)  #0-100+
Out[1242]:
40.00115148261854
In [1243]:
np.min(l_age_grp_2006_percent)  #0-14
Out[1243]:
1.251221333586208
In [1244]:
total_male_percent_2006= (s6_2/s6_1)*100
total_male_percent_2006
Out[1244]:
64.09457059011791
In [1245]:
total_female_percent_2006= (s6_3/s6_1)*100
total_female_percent_2006
Out[1245]:
35.90542940988209
In [ ]:
 

2007

In [1246]:
df_2007 = suicide_df.loc[(suicide_df["Year"]==2007)]

df_2007
Out[1246]:
State Year Type Gender Age_group Total
1594 A & N ISLANDS 2007 Cancer Female 30-44 0
1595 A & N ISLANDS 2007 Failure in Examination Female 0-14 2
1596 A & N ISLANDS 2007 Failure in Examination Male 60+ 0
1597 A & N ISLANDS 2007 Unemployment Female 45-59 0
1598 A & N ISLANDS 2007 By Jumping from (Building) Female 15-29 0
... ... ... ... ... ... ...
236496 WEST BENGAL 2007 By touching electric wires Male 45-59 8
236497 WEST BENGAL 2007 Others Male 15-29 562
236498 WEST BENGAL 2007 Others Male 45-59 297
236499 WEST BENGAL 2007 Retired Person Female 30-44 0
236500 WEST BENGAL 2007 Service (Government) Male 60+ 2

19716 rows × 6 columns

In [1247]:
t2007_dcount = df_2007.loc[:,"Total"]

s7_1 = np.sum(t2007_dcount)

s7_1
Out[1247]:
613119
In [1248]:
male_2007 = df_2007.loc[(df_2007["Gender"]=="Male")]

male_2007
Out[1248]:
State Year Type Gender Age_group Total
1596 A & N ISLANDS 2007 Failure in Examination Male 60+ 0
2485 A & N ISLANDS 2007 No Education Male 0-100+ 19
2488 A & N ISLANDS 2007 By Jumping off Moving Vehicles/Trains Male 15-29 0
2490 A & N ISLANDS 2007 Others Male 15-29 0
2491 A & N ISLANDS 2007 Farming/Agriculture Activity Male 0-14 0
... ... ... ... ... ... ...
236495 WEST BENGAL 2007 By Self Infliction of injury Male 15-29 1
236496 WEST BENGAL 2007 By touching electric wires Male 45-59 8
236497 WEST BENGAL 2007 Others Male 15-29 562
236498 WEST BENGAL 2007 Others Male 45-59 297
236500 WEST BENGAL 2007 Service (Government) Male 60+ 2

9867 rows × 6 columns

In [1249]:
m2007_count = male_2007.loc[:,"Total"]
s7_2 = np.sum(m2007_count)

s7_2
Out[1249]:
396455
In [1250]:
female_2007 = df_2007.loc[(df_2007["Gender"]=="Female")]

female_2007
Out[1250]:
State Year Type Gender Age_group Total
1594 A & N ISLANDS 2007 Cancer Female 30-44 0
1595 A & N ISLANDS 2007 Failure in Examination Female 0-14 2
1597 A & N ISLANDS 2007 Unemployment Female 45-59 0
1598 A & N ISLANDS 2007 By Jumping from (Building) Female 15-29 0
1599 A & N ISLANDS 2007 By Overdose of sleeping pills Female 60+ 0
... ... ... ... ... ... ...
236487 WEST BENGAL 2007 Physical Abuse (Rape/Incest Etc.) Female 30-44 0
236488 WEST BENGAL 2007 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
236489 WEST BENGAL 2007 By Consuming Insecticides Female 45-59 169
236494 WEST BENGAL 2007 Others Female 30-44 161
236499 WEST BENGAL 2007 Retired Person Female 30-44 0

9849 rows × 6 columns

In [1251]:
fm2007_count = female_2007.loc[:,"Total"]
s7_3 = np.sum(fm2007_count)
s7_3
Out[1251]:
216664
In [1252]:
df_age_d014_2007 = df_2007.loc[(df_2007["Age_group"]=="0-14")]

df_age_d014_2007
Out[1252]:
State Year Type Gender Age_group Total
1595 A & N ISLANDS 2007 Failure in Examination Female 0-14 2
2484 A & N ISLANDS 2007 Professional/Career Problem Female 0-14 0
2487 A & N ISLANDS 2007 By Jumping from (Building) Female 0-14 0
2491 A & N ISLANDS 2007 Farming/Agriculture Activity Male 0-14 0
2492 A & N ISLANDS 2007 Others Female 0-14 2
... ... ... ... ... ... ...
236244 UTTARAKHAND 2007 Divorce Male 0-14 0
236265 UTTARAKHAND 2007 By Machine Male 0-14 0
236266 UTTARAKHAND 2007 House Wife Male 0-14 0
236485 WEST BENGAL 2007 Insanity/Mental Illness Male 0-14 2
236493 WEST BENGAL 2007 By Jumping off Moving Vehicles/Trains Male 0-14 0

3753 rows × 6 columns

In [1253]:
t_014_2007 = df_age_d014_2007.loc[:,"Total"]

s7_4 = np.sum(t_014_2007)
s7_4
c:\program files\python\python38-32\lib\site-packages\IPython\core\displayhook.py:275: UserWarning: Output cache limit (currently 1000 entries) hit.
Flushing oldest 200 entries.
  warn('Output cache limit (currently {sz} entries) hit.\n'
Out[1253]:
7410
In [1254]:
df_age_d1529_2007 = df_2007.loc[(df_2007["Age_group"]=="15-29")]

df_age_d1529_2007
Out[1254]:
State Year Type Gender Age_group Total
1598 A & N ISLANDS 2007 By Jumping from (Building) Female 15-29 0
2488 A & N ISLANDS 2007 By Jumping off Moving Vehicles/Trains Male 15-29 0
2490 A & N ISLANDS 2007 Others Male 15-29 0
2493 A & N ISLANDS 2007 Others Female 15-29 9
2590 A & N ISLANDS 2007 Cancellation/Non-Settlement of Marriage Female 15-29 0
... ... ... ... ... ... ...
236258 UTTARAKHAND 2007 By Fire/Self Immolation Female 15-29 7
236259 UTTARAKHAND 2007 By Fire-Arms Female 15-29 0
236267 UTTARAKHAND 2007 Public Sector Undertaking Female 15-29 3
236495 WEST BENGAL 2007 By Self Infliction of injury Male 15-29 1
236497 WEST BENGAL 2007 Others Male 15-29 562

3772 rows × 6 columns

In [1255]:
t_1529_2007 = df_age_d1529_2007.loc[:,"Total"]

s7_5 = np.sum(t_1529_2007)

s7_5
Out[1255]:
129477
In [1256]:
df_age_d3044_2007 = df_2007.loc[(df_2007["Age_group"]=="30-44")]

df_age_d3044_2007
Out[1256]:
State Year Type Gender Age_group Total
1594 A & N ISLANDS 2007 Cancer Female 30-44 0
2482 A & N ISLANDS 2007 Divorce Female 30-44 0
2489 A & N ISLANDS 2007 By Machine Female 30-44 0
2494 A & N ISLANDS 2007 Others Female 30-44 0
2495 A & N ISLANDS 2007 Others Male 30-44 4
... ... ... ... ... ... ...
236263 UTTARAKHAND 2007 By Jumping off Moving Vehicles/Trains Male 30-44 0
236487 WEST BENGAL 2007 Physical Abuse (Rape/Incest Etc.) Female 30-44 0
236492 WEST BENGAL 2007 By Fire-Arms Male 30-44 8
236494 WEST BENGAL 2007 Others Female 30-44 161
236499 WEST BENGAL 2007 Retired Person Female 30-44 0

3767 rows × 6 columns

In [1257]:
t_3044_2007 = df_age_d3044_2007.loc[:,"Total"]

s7_6 = np.sum(t_3044_2007)
s7_6
Out[1257]:
125475
In [1258]:
df_age_d4559_2007 = df_2007.loc[(df_2007["Age_group"]=="45-59")]

df_age_d4559_2007
Out[1258]:
State Year Type Gender Age_group Total
1597 A & N ISLANDS 2007 Unemployment Female 45-59 0
2483 A & N ISLANDS 2007 Dowry Dispute Female 45-59 0
2486 A & N ISLANDS 2007 By Drowning Female 45-59 0
2589 A & N ISLANDS 2007 Bankruptcy or Sudden change in Economic Male 45-59 0
2598 A & N ISLANDS 2007 By Fire/Self Immolation Female 45-59 0
... ... ... ... ... ... ...
236486 WEST BENGAL 2007 Others Female 45-59 111
236489 WEST BENGAL 2007 By Consuming Insecticides Female 45-59 169
236491 WEST BENGAL 2007 By Fire/Self Immolation Male 45-59 16
236496 WEST BENGAL 2007 By touching electric wires Male 45-59 8
236498 WEST BENGAL 2007 Others Male 45-59 297

3758 rows × 6 columns

In [1259]:
t_4559_2007 = df_age_d4559_2007.loc[:,"Total"]

s7_7 = np.sum(t_4559_2007)

s7_7
Out[1259]:
76699
In [1260]:
df_age_d60_2007 = df_2007.loc[(df_2007["Age_group"]=="60+")]

df_age_d60_2007
Out[1260]:
State Year Type Gender Age_group Total
1596 A & N ISLANDS 2007 Failure in Examination Male 60+ 0
1599 A & N ISLANDS 2007 By Overdose of sleeping pills Female 60+ 0
2481 A & N ISLANDS 2007 Causes Not known Female 60+ 0
2497 A & N ISLANDS 2007 Service (Private) Male 60+ 2
2588 A & N ISLANDS 2007 Bankruptcy or Sudden change in Economic Female 60+ 0
... ... ... ... ... ... ...
236268 UTTARAKHAND 2007 Public Sector Undertaking Female 60+ 0
236484 WEST BENGAL 2007 Cancellation/Non-Settlement of Marriage Female 60+ 0
236488 WEST BENGAL 2007 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
236490 WEST BENGAL 2007 By Drowning Male 60+ 8
236500 WEST BENGAL 2007 Service (Government) Male 60+ 2

3756 rows × 6 columns

In [1261]:
t_60_2007 = df_age_d60_2007.loc[:,"Total"]

s7_8 = np.sum(t_60_2007)
s7_8
Out[1261]:
28784
In [1262]:
df_age_d0100_2007 = df_2007.loc[(df_2007["Age_group"]=="0-100+")]

df_age_d0100_2007
Out[1262]:
State Year Type Gender Age_group Total
2485 A & N ISLANDS 2007 No Education Male 0-100+ 19
2604 A & N ISLANDS 2007 Never Married Male 0-100+ 45
2688 A & N ISLANDS 2007 Divorcee Female 0-100+ 0
2816 A & N ISLANDS 2007 Married Female 0-100+ 33
2941 A & N ISLANDS 2007 Seperated Male 0-100+ 0
... ... ... ... ... ... ...
235184 RAJASTHAN 2007 Seperated Male 0-100+ 18
235412 SIKKIM 2007 Graduate Female 0-100+ 0
235848 TRIPURA 2007 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 38
236033 UTTAR PRADESH 2007 Hr. Secondary/Intermediate/Pre-Universit Female 0-100+ 194
236034 UTTAR PRADESH 2007 Matriculate/Secondary Male 0-100+ 372

910 rows × 6 columns

In [1263]:
t_0100_2007 = df_age_d0100_2007.loc[:,"Total"]

s7_54 = np.sum(t_0100_2007)
s7_54
Out[1263]:
245274
In [1264]:
df_014m_2007 = df_age_d014_2007.loc[(df_age_d014_2007["Gender"]=="Male")]
df_014m_2007
Out[1264]:
State Year Type Gender Age_group Total
2491 A & N ISLANDS 2007 Farming/Agriculture Activity Male 0-14 0
2595 A & N ISLANDS 2007 Poverty Male 0-14 0
2597 A & N ISLANDS 2007 By Consuming Other Poison Male 0-14 0
2673 A & N ISLANDS 2007 Fall in Social Reputation Male 0-14 0
2678 A & N ISLANDS 2007 By Jumping from (Other sites) Male 0-14 0
... ... ... ... ... ... ...
236244 UTTARAKHAND 2007 Divorce Male 0-14 0
236265 UTTARAKHAND 2007 By Machine Male 0-14 0
236266 UTTARAKHAND 2007 House Wife Male 0-14 0
236485 WEST BENGAL 2007 Insanity/Mental Illness Male 0-14 2
236493 WEST BENGAL 2007 By Jumping off Moving Vehicles/Trains Male 0-14 0

1875 rows × 6 columns

In [1265]:
t_014m_2007 = df_014m_2007.loc[:,"Total"]

s7_9 = np.sum(t_014m_2007)
s7_9
Out[1265]:
3542
In [1266]:
df_014fm_2007 = df_age_d014_2007.loc[(df_age_d014_2007["Gender"]=="Female")]
df_014fm_2007
Out[1266]:
State Year Type Gender Age_group Total
1595 A & N ISLANDS 2007 Failure in Examination Female 0-14 2
2484 A & N ISLANDS 2007 Professional/Career Problem Female 0-14 0
2487 A & N ISLANDS 2007 By Jumping from (Building) Female 0-14 0
2492 A & N ISLANDS 2007 Others Female 0-14 2
2594 A & N ISLANDS 2007 Other Prolonged Illness Female 0-14 0
... ... ... ... ... ... ...
235628 TAMIL NADU 2007 Professional/Career Problem Female 0-14 0
235636 TAMIL NADU 2007 By Consuming Other Poison Female 0-14 0
235637 TAMIL NADU 2007 By Jumping from (Building) Female 0-14 0
236029 UTTAR PRADESH 2007 Not having Children(Barrenness/Impotency Female 0-14 0
236239 UTTARAKHAND 2007 Cancer Female 0-14 0

1878 rows × 6 columns

In [1267]:
t_014fm_2007 = df_014fm_2007.loc[:,"Total"]

s7_10 = np.sum(t_014fm_2007)
s7_10
Out[1267]:
3868
In [1268]:
df_1529m_2007 = df_age_d1529_2007.loc[(df_age_d1529_2007["Gender"]=="Male")]
df_1529m_2007
Out[1268]:
State Year Type Gender Age_group Total
2488 A & N ISLANDS 2007 By Jumping off Moving Vehicles/Trains Male 15-29 0
2490 A & N ISLANDS 2007 Others Male 15-29 0
2671 A & N ISLANDS 2007 Cancer Male 15-29 0
2676 A & N ISLANDS 2007 Property Dispute Male 15-29 0
2805 A & N ISLANDS 2007 Cancellation/Non-Settlement of Marriage Male 15-29 1
... ... ... ... ... ... ...
236245 UTTARAKHAND 2007 Divorce Male 15-29 0
236246 UTTARAKHAND 2007 Drug Abuse/Addiction Male 15-29 0
236248 UTTARAKHAND 2007 Not having Children(Barrenness/Impotency Male 15-29 0
236495 WEST BENGAL 2007 By Self Infliction of injury Male 15-29 1
236497 WEST BENGAL 2007 Others Male 15-29 562

1887 rows × 6 columns

In [1269]:
t_1529m_2007 = df_1529m_2007.loc[:,"Total"]

s7_11 = np.sum(t_1529m_2007)
s7_11
Out[1269]:
70336
In [1270]:
df_1529fm_2007 = df_age_d1529_2007.loc[(df_age_d1529_2007["Gender"]=="Female")]
df_1529fm_2007
Out[1270]:
State Year Type Gender Age_group Total
1598 A & N ISLANDS 2007 By Jumping from (Building) Female 15-29 0
2493 A & N ISLANDS 2007 Others Female 15-29 9
2590 A & N ISLANDS 2007 Cancellation/Non-Settlement of Marriage Female 15-29 0
2591 A & N ISLANDS 2007 Causes Not known Female 15-29 0
2593 A & N ISLANDS 2007 Ideological Causes/Hero Worshipping Female 15-29 0
... ... ... ... ... ... ...
236247 UTTARAKHAND 2007 Failure in Examination Female 15-29 2
236257 UTTARAKHAND 2007 By Drowning Female 15-29 3
236258 UTTARAKHAND 2007 By Fire/Self Immolation Female 15-29 7
236259 UTTARAKHAND 2007 By Fire-Arms Female 15-29 0
236267 UTTARAKHAND 2007 Public Sector Undertaking Female 15-29 3

1885 rows × 6 columns

In [1271]:
t_1529fm_2007 = df_1529fm_2007.loc[:,"Total"]

s7_12 = np.sum(t_1529fm_2007)
s7_12
Out[1271]:
59141
In [1272]:
df_3044m_2007 = df_age_d3044_2007.loc[(df_age_d3044_2007["Gender"]=="Male")]
df_3044m_2007
Out[1272]:
State Year Type Gender Age_group Total
2495 A & N ISLANDS 2007 Others Male 30-44 4
2496 A & N ISLANDS 2007 Professional Activity Male 30-44 0
2674 A & N ISLANDS 2007 Other Prolonged Illness Male 30-44 1
2807 A & N ISLANDS 2007 Love Affairs Male 30-44 0
2969 A & N ISLANDS 2007 Dowry Dispute Male 30-44 0
... ... ... ... ... ... ...
236031 UTTAR PRADESH 2007 Property Dispute Male 30-44 17
236254 UTTARAKHAND 2007 By coming under running vehicles/trains Male 30-44 0
236255 UTTARAKHAND 2007 By Consuming Insecticides Male 30-44 11
236263 UTTARAKHAND 2007 By Jumping off Moving Vehicles/Trains Male 30-44 0
236492 WEST BENGAL 2007 By Fire-Arms Male 30-44 8

1886 rows × 6 columns

In [1273]:
t_3044m_2007 = df_3044m_2007.loc[:,"Total"]

s7_13 = np.sum(t_3044m_2007)
s7_13
Out[1273]:
85650
In [1274]:
df_3044fm_2007 = df_age_d3044_2007.loc[(df_age_d3044_2007["Gender"]=="Female")]
df_3044fm_2007
Out[1274]:
State Year Type Gender Age_group Total
1594 A & N ISLANDS 2007 Cancer Female 30-44 0
2482 A & N ISLANDS 2007 Divorce Female 30-44 0
2489 A & N ISLANDS 2007 By Machine Female 30-44 0
2494 A & N ISLANDS 2007 Others Female 30-44 0
2592 A & N ISLANDS 2007 Drug Abuse/Addiction Female 30-44 0
... ... ... ... ... ... ...
236251 UTTARAKHAND 2007 Professional/Career Problem Female 30-44 0
236261 UTTARAKHAND 2007 By Jumping from (Building) Female 30-44 0
236487 WEST BENGAL 2007 Physical Abuse (Rape/Incest Etc.) Female 30-44 0
236494 WEST BENGAL 2007 Others Female 30-44 161
236499 WEST BENGAL 2007 Retired Person Female 30-44 0

1881 rows × 6 columns

In [1275]:
t_3044fm_2007 = df_3044fm_2007.loc[:,"Total"]

s7_14 = np.sum(t_3044fm_2007)
s7_14
Out[1275]:
39825
In [1276]:
df_4559m_2007 = df_age_d4559_2007.loc[(df_age_d4559_2007["Gender"]=="Male")]
df_4559m_2007
Out[1276]:
State Year Type Gender Age_group Total
2589 A & N ISLANDS 2007 Bankruptcy or Sudden change in Economic Male 45-59 0
2601 A & N ISLANDS 2007 Public Sector Undertaking Male 45-59 0
2672 A & N ISLANDS 2007 Drug Abuse/Addiction Male 45-59 0
2675 A & N ISLANDS 2007 Paralysis Male 45-59 0
2813 A & N ISLANDS 2007 Others Male 45-59 0
... ... ... ... ... ... ...
236240 UTTARAKHAND 2007 Cancer Male 45-59 0
236256 UTTARAKHAND 2007 By Consuming Insecticides Male 45-59 3
236491 WEST BENGAL 2007 By Fire/Self Immolation Male 45-59 16
236496 WEST BENGAL 2007 By touching electric wires Male 45-59 8
236498 WEST BENGAL 2007 Others Male 45-59 297

1883 rows × 6 columns

In [1277]:
t_4559m_2007 = df_4559m_2007.loc[:,"Total"]

s7_15 = np.sum(t_4559m_2007)
s7_15
Out[1277]:
57335
In [1278]:
df_4559fm_2007 = df_age_d4559_2007.loc[(df_age_d4559_2007["Gender"]=="Female")]
df_4559fm_2007
Out[1278]:
State Year Type Gender Age_group Total
1597 A & N ISLANDS 2007 Unemployment Female 45-59 0
2483 A & N ISLANDS 2007 Dowry Dispute Female 45-59 0
2486 A & N ISLANDS 2007 By Drowning Female 45-59 0
2598 A & N ISLANDS 2007 By Fire/Self Immolation Female 45-59 0
2603 A & N ISLANDS 2007 Service (Private) Female 45-59 0
... ... ... ... ... ... ...
236250 UTTARAKHAND 2007 Others Female 45-59 2
236252 UTTARAKHAND 2007 Suspected/Illicit Relation Female 45-59 0
236262 UTTARAKHAND 2007 By Jumping from (Other sites) Female 45-59 0
236486 WEST BENGAL 2007 Others Female 45-59 111
236489 WEST BENGAL 2007 By Consuming Insecticides Female 45-59 169

1875 rows × 6 columns

In [1279]:
t_4559fm_2007 = df_4559fm_2007.loc[:,"Total"]

s7_16 = np.sum(t_4559fm_2007)
s7_16
Out[1279]:
19364
In [1280]:
df_60m_2007 = df_age_d60_2007.loc[(df_age_d60_2007["Gender"]=="Male")]
df_60m_2007
Out[1280]:
State Year Type Gender Age_group Total
1596 A & N ISLANDS 2007 Failure in Examination Male 60+ 0
2497 A & N ISLANDS 2007 Service (Private) Male 60+ 2
2596 A & N ISLANDS 2007 Professional/Career Problem Male 60+ 0
2683 A & N ISLANDS 2007 House Wife Male 60+ 0
2809 A & N ISLANDS 2007 Other Prolonged Illness Male 60+ 4
... ... ... ... ... ... ...
236249 UTTARAKHAND 2007 Not having Children(Barrenness/Impotency Male 60+ 0
236253 UTTARAKHAND 2007 Unemployment Male 60+ 0
236264 UTTARAKHAND 2007 By Jumping off Moving Vehicles/Trains Male 60+ 0
236490 WEST BENGAL 2007 By Drowning Male 60+ 8
236500 WEST BENGAL 2007 Service (Government) Male 60+ 2

1881 rows × 6 columns

In [1281]:
t_60m_2007 = df_60m_2007.loc[:,"Total"]

s7_17 = np.sum(t_60m_2007)
s7_17
Out[1281]:
21002
In [1282]:
df_60fm_2007 = df_age_d60_2007.loc[(df_age_d60_2007["Gender"]=="Female")]
df_60fm_2007
Out[1282]:
State Year Type Gender Age_group Total
1599 A & N ISLANDS 2007 By Overdose of sleeping pills Female 60+ 0
2481 A & N ISLANDS 2007 Causes Not known Female 60+ 0
2588 A & N ISLANDS 2007 Bankruptcy or Sudden change in Economic Female 60+ 0
2715 A & N ISLANDS 2007 By touching electric wires Female 60+ 0
2717 A & N ISLANDS 2007 Service (Private) Female 60+ 0
... ... ... ... ... ... ...
235849 TRIPURA 2007 By Consuming Other Poison Female 60+ 3
236260 UTTARAKHAND 2007 By Fire-Arms Female 60+ 0
236268 UTTARAKHAND 2007 Public Sector Undertaking Female 60+ 0
236484 WEST BENGAL 2007 Cancellation/Non-Settlement of Marriage Female 60+ 0
236488 WEST BENGAL 2007 Physical Abuse (Rape/Incest Etc.) Female 60+ 0

1875 rows × 6 columns

In [1283]:
t_60fm_2007 = df_60fm_2007.loc[:,"Total"]

s7_18 = np.sum(t_60fm_2007)
s7_18
Out[1283]:
7782
In [1284]:
df_0100fm_2007 = df_age_d0100_2007.loc[(df_age_d0100_2007["Gender"]=="Female")]
df_0100fm_2007
Out[1284]:
State Year Type Gender Age_group Total
2688 A & N ISLANDS 2007 Divorcee Female 0-100+ 0
2816 A & N ISLANDS 2007 Married Female 0-100+ 33
3482 A & N ISLANDS 2007 Post Graduate and Above Female 0-100+ 0
3765 A & N ISLANDS 2007 Primary Female 0-100+ 4
3774 A & N ISLANDS 2007 Seperated Female 0-100+ 0
... ... ... ... ... ... ...
234795 PUDUCHERRY 2007 Never Married Female 0-100+ 74
234969 PUNJAB 2007 Graduate Female 0-100+ 1
235175 RAJASTHAN 2007 Diploma Female 0-100+ 3
235412 SIKKIM 2007 Graduate Female 0-100+ 0
236033 UTTAR PRADESH 2007 Hr. Secondary/Intermediate/Pre-Universit Female 0-100+ 194

455 rows × 6 columns

In [1285]:
t_0100fm_2007 = df_0100fm_2007.loc[:,"Total"]

s7_55 = np.sum(t_0100fm_2007)
s7_55
Out[1285]:
86684
In [1286]:
df_0100m_2007 = df_age_d0100_2007.loc[(df_age_d0100_2007["Gender"]=="Male")]
df_0100m_2007
Out[1286]:
State Year Type Gender Age_group Total
2485 A & N ISLANDS 2007 No Education Male 0-100+ 19
2604 A & N ISLANDS 2007 Never Married Male 0-100+ 45
2941 A & N ISLANDS 2007 Seperated Male 0-100+ 0
3085 A & N ISLANDS 2007 Primary Male 0-100+ 10
3404 A & N ISLANDS 2007 Diploma Male 0-100+ 0
... ... ... ... ... ... ...
234371 NAGALAND 2007 Seperated Male 0-100+ 0
234981 PUNJAB 2007 Divorcee Male 0-100+ 0
235184 RAJASTHAN 2007 Seperated Male 0-100+ 18
235848 TRIPURA 2007 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 38
236034 UTTAR PRADESH 2007 Matriculate/Secondary Male 0-100+ 372

455 rows × 6 columns

In [1287]:
t_0100m_2007 = df_0100m_2007.loc[:,"Total"]

s7_56 = np.sum(t_0100m_2007)
s7_56
Out[1287]:
158590
In [1288]:
df_st_AN_2007 = df_2007.loc[(df_2007["State"]=="A & N ISLANDS")]

df_st_AN_2007
Out[1288]:
State Year Type Gender Age_group Total
1594 A & N ISLANDS 2007 Cancer Female 30-44 0
1595 A & N ISLANDS 2007 Failure in Examination Female 0-14 2
1596 A & N ISLANDS 2007 Failure in Examination Male 60+ 0
1597 A & N ISLANDS 2007 Unemployment Female 45-59 0
1598 A & N ISLANDS 2007 By Jumping from (Building) Female 15-29 0
... ... ... ... ... ... ...
7989 A & N ISLANDS 2007 House Wife Female 15-29 10
7990 A & N ISLANDS 2007 Professional Activity Female 30-44 0
7991 A & N ISLANDS 2007 Self-employed (Business activity) Female 30-44 0
7992 A & N ISLANDS 2007 Self-employed (Business activity) Female 60+ 0
7993 A & N ISLANDS 2007 Never Married Female 0-100+ 23

560 rows × 6 columns

In [1289]:
t_AN_2007 = df_st_AN_2007.loc[:,"Total"]

s7_19 = np.sum(t_AN_2007)
s7_19
Out[1289]:
775
In [1290]:
df_st_AP_2007 = df_2007.loc[(df_2007["State"]=="ANDHRA PRADESH")]

df_st_AP_2007
Out[1290]:
State Year Type Gender Age_group Total
7306 ANDHRA PRADESH 2007 Dowry Dispute Female 60+ 0
7307 ANDHRA PRADESH 2007 Dowry Dispute Male 45-59 0
7308 ANDHRA PRADESH 2007 Family Problems Male 15-29 620
7309 ANDHRA PRADESH 2007 Ideological Causes/Hero Worshipping Female 60+ 0
7310 ANDHRA PRADESH 2007 Other Prolonged Illness Female 60+ 95
... ... ... ... ... ... ...
229446 ANDHRA PRADESH 2007 Others Male 15-29 213
229447 ANDHRA PRADESH 2007 By Self Infliction of injury Female 45-59 0
229448 ANDHRA PRADESH 2007 Others Female 30-44 197
229449 ANDHRA PRADESH 2007 Service (Government) Male 15-29 71
229450 ANDHRA PRADESH 2007 Unemployed Male 60+ 0

566 rows × 6 columns

In [1291]:
t_AP_2007 = df_st_AP_2007.loc[:,"Total"]

s7_20 = np.sum(t_AP_2007)
s7_20
Out[1291]:
74410
In [1292]:
df_st_ARP_2007 = df_2007.loc[(df_2007["State"]=="ARUNACHAL PRADESH")]

df_st_ARP_2007
Out[1292]:
State Year Type Gender Age_group Total
12330 ARUNACHAL PRADESH 2007 Family Problems Male 15-29 0
12331 ARUNACHAL PRADESH 2007 By Fire/Self Immolation Male 45-59 0
12332 ARUNACHAL PRADESH 2007 By Over Alcoholism Male 30-44 0
12333 ARUNACHAL PRADESH 2007 Farming/Agriculture Activity Female 45-59 0
12334 ARUNACHAL PRADESH 2007 Public Sector Undertaking Male 0-14 0
... ... ... ... ... ... ...
229646 ARUNACHAL PRADESH 2007 By Jumping off Moving Vehicles/Trains Female 0-14 0
229647 ARUNACHAL PRADESH 2007 Others Female 60+ 0
229648 ARUNACHAL PRADESH 2007 By touching electric wires Male 0-14 0
229649 ARUNACHAL PRADESH 2007 Farming/Agriculture Activity Female 60+ 0
229650 ARUNACHAL PRADESH 2007 House Wife Female 15-29 2

561 rows × 6 columns

In [1293]:
t_ARP_2007 = df_st_ARP_2007.loc[:,"Total"]

s7_21 = np.sum(t_ARP_2007)
s7_21
Out[1293]:
644
In [1294]:
df_st_AS_2007 = df_2007.loc[(df_2007["State"]=="ASSAM")]

df_st_AS_2007
Out[1294]:
State Year Type Gender Age_group Total
17040 ASSAM 2007 Love Affairs Female 60+ 0
17041 ASSAM 2007 Not having Children(Barrenness/Impotency Female 45-59 0
17042 ASSAM 2007 Others Female 30-44 18
17043 ASSAM 2007 Paralysis Male 60+ 0
17044 ASSAM 2007 Property Dispute Female 30-44 27
... ... ... ... ... ... ...
229841 ASSAM 2007 By Hanging Male 15-29 337
229842 ASSAM 2007 By Jumping off Moving Vehicles/Trains Male 45-59 5
229843 ASSAM 2007 By Overdose of sleeping pills Female 15-29 0
229844 ASSAM 2007 Retired Person Male 15-29 0
229845 ASSAM 2007 Self-employed (Business activity) Female 0-14 1

565 rows × 6 columns

In [1295]:
t_AS_2007 = df_st_AS_2007.loc[:,"Total"]

s7_22 = np.sum(t_AS_2007)
s7_22
Out[1295]:
15301
In [1296]:
df_st_BH_2007 = df_2007.loc[(df_2007["State"]=="BIHAR")]

df_st_BH_2007
Out[1296]:
State Year Type Gender Age_group Total
24645 BIHAR 2007 Death of Dear Person Female 60+ 0
24646 BIHAR 2007 Divorce Female 15-29 0
24647 BIHAR 2007 Divorce Male 45-59 0
24648 BIHAR 2007 Family Problems Male 0-14 5
24649 BIHAR 2007 Ideological Causes/Hero Worshipping Female 15-29 1
... ... ... ... ... ... ...
230084 BIHAR 2007 Retired Person Male 0-14 0
230085 BIHAR 2007 Self-employed (Business activity) Female 60+ 0
230086 BIHAR 2007 Service (Government) Male 45-59 4
230087 BIHAR 2007 Student Male 60+ 0
230088 BIHAR 2007 Married Male 0-100+ 310

566 rows × 6 columns

In [1297]:
t_BH_2007 = df_st_BH_2007.loc[:,"Total"]

s7_23 = np.sum(t_BH_2007)
s7_23
Out[1297]:
4825
In [1298]:
df_st_CH_2007 = df_2007.loc[(df_2007["State"]=="CHANDIGARH")]

df_st_CH_2007
Out[1298]:
State Year Type Gender Age_group Total
30522 CHANDIGARH 2007 Bankruptcy or Sudden change in Economic Male 45-59 0
30523 CHANDIGARH 2007 Death of Dear Person Female 15-29 0
30524 CHANDIGARH 2007 Death of Dear Person Female 60+ 0
30525 CHANDIGARH 2007 Dowry Dispute Female 15-29 1
30526 CHANDIGARH 2007 Dowry Dispute Female 45-59 0
... ... ... ... ... ... ...
230296 CHANDIGARH 2007 House Wife Female 30-44 8
230297 CHANDIGARH 2007 Professional Activity Male 15-29 0
230298 CHANDIGARH 2007 Public Sector Undertaking Male 15-29 0
230299 CHANDIGARH 2007 Public Sector Undertaking Male 60+ 0
230300 CHANDIGARH 2007 Self-employed (Business activity) Male 15-29 0

558 rows × 6 columns

In [1299]:
t_CH_2007 = df_st_CH_2007.loc[:,"Total"]

s7_24 = np.sum(t_CH_2007)
s7_24
Out[1299]:
408
In [1300]:
df_st_CT_2007 = df_2007.loc[(df_2007["State"]=="CHHATTISGARH")]

df_st_CT_2007
Out[1300]:
State Year Type Gender Age_group Total
38172 CHHATTISGARH 2007 Bankruptcy or Sudden change in Economic Male 15-29 24
38173 CHHATTISGARH 2007 Fall in Social Reputation Male 45-59 2
38174 CHHATTISGARH 2007 Illegitimate Pregnancy Male 45-59 0
38175 CHHATTISGARH 2007 Unemployment Female 0-14 2
38176 CHHATTISGARH 2007 By coming under running vehicles/trains Male 0-14 0
... ... ... ... ... ... ...
230524 CHHATTISGARH 2007 Others Female 0-14 20
230525 CHHATTISGARH 2007 Others Female 60+ 10
230526 CHHATTISGARH 2007 Others Male 45-59 139
230527 CHHATTISGARH 2007 Professional Activity Male 0-14 0
230528 CHHATTISGARH 2007 Public Sector Undertaking Male 0-14 0

566 rows × 6 columns

In [1301]:
t_CT_2007 = df_st_CT_2007.loc[:,"Total"]

s7_25 = np.sum(t_CT_2007)
s7_25
Out[1301]:
24195
In [1302]:
df_st_DN_2007 = df_2007.loc[(df_2007["State"]=="D & N HAVELI")]

df_st_DN_2007
Out[1302]:
State Year Type Gender Age_group Total
43679 D & N HAVELI 2007 Cancellation/Non-Settlement of Marriage Male 0-14 0
43680 D & N HAVELI 2007 Divorce Male 60+ 0
43681 D & N HAVELI 2007 Dowry Dispute Female 60+ 0
43682 D & N HAVELI 2007 Illness (Aids/STD) Female 0-14 0
43683 D & N HAVELI 2007 Illness (Aids/STD) Male 45-59 0
... ... ... ... ... ... ...
230733 D & N HAVELI 2007 By Jumping off Moving Vehicles/Trains Female 60+ 0
230734 D & N HAVELI 2007 By Over Alcoholism Male 15-29 0
230735 D & N HAVELI 2007 House Wife Female 0-14 0
230736 D & N HAVELI 2007 Retired Person Male 60+ 5
230737 D & N HAVELI 2007 Unemployed Male 0-14 0

557 rows × 6 columns

In [1303]:
t_DN_2007 = df_st_DN_2007.loc[:,"Total"]

s7_26 = np.sum(t_DN_2007)
s7_26
Out[1303]:
380
In [1304]:
df_st_DD_2007 = df_2007.loc[(df_2007["State"]=="DAMAN & DIU")]

df_st_DD_2007
Out[1304]:
State Year Type Gender Age_group Total
50365 DAMAN & DIU 2007 Causes Not known Male 45-59 2
50366 DAMAN & DIU 2007 Death of Dear Person Male 30-44 0
50367 DAMAN & DIU 2007 Drug Abuse/Addiction Female 60+ 0
50368 DAMAN & DIU 2007 Failure in Examination Female 15-29 0
50369 DAMAN & DIU 2007 Illegitimate Pregnancy Male 30-44 0
... ... ... ... ... ... ...
230926 DAMAN & DIU 2007 Service (Government) Female 45-59 0
230927 DAMAN & DIU 2007 Student Female 0-14 0
230928 DAMAN & DIU 2007 Student Male 45-59 0
230929 DAMAN & DIU 2007 Unemployed Male 45-59 0
230930 DAMAN & DIU 2007 Divorcee Female 0-100+ 0

557 rows × 6 columns

In [1305]:
t_DD_2007 = df_st_DD_2007.loc[:,"Total"]

s7_27 = np.sum(t_DD_2007)
s7_27
Out[1305]:
75
In [1306]:
df_st_DL_2007 = df_2007.loc[(df_2007["State"]=="DELHI (UT)")]

df_st_DL_2007
Out[1306]:
State Year Type Gender Age_group Total
55117 DELHI (UT) 2007 Cancer Male 45-59 0
55118 DELHI (UT) 2007 Death of Dear Person Female 15-29 1
55119 DELHI (UT) 2007 Divorce Male 45-59 0
55120 DELHI (UT) 2007 Dowry Dispute Male 30-44 0
55121 DELHI (UT) 2007 Drug Abuse/Addiction Female 15-29 1
... ... ... ... ... ... ...
231159 DELHI (UT) 2007 By Fire-Arms Male 45-59 0
231160 DELHI (UT) 2007 By Jumping from (Other sites) Female 60+ 1
231161 DELHI (UT) 2007 By Jumping off Moving Vehicles/Trains Male 0-14 0
231162 DELHI (UT) 2007 Public Sector Undertaking Male 45-59 3
231163 DELHI (UT) 2007 Retired Person Female 30-44 0

566 rows × 6 columns

In [1307]:
t_DL_2007 = df_st_DL_2007.loc[:,"Total"]

s7_28 = np.sum(t_DL_2007)
s7_28
Out[1307]:
7405
In [1308]:
df_st_GOA_2007 = df_2007.loc[(df_2007["State"]=="GOA")]

df_st_GOA_2007
Out[1308]:
State Year Type Gender Age_group Total
60651 GOA 2007 Cancer Male 60+ 0
60652 GOA 2007 Divorce Female 45-59 0
60653 GOA 2007 Dowry Dispute Female 30-44 0
60654 GOA 2007 Family Problems Male 30-44 10
60655 GOA 2007 Family Problems Male 45-59 5
... ... ... ... ... ... ...
231400 GOA 2007 House Wife Male 15-29 0
231401 GOA 2007 Service (Government) Male 15-29 0
231402 GOA 2007 Service (Government) Male 60+ 0
231403 GOA 2007 Service (Private) Female 15-29 7
231404 GOA 2007 Unemployed Male 30-44 29

563 rows × 6 columns

In [1309]:
t_GOA_2007 = df_st_GOA_2007.loc[:,"Total"]

s7_29 = np.sum(t_GOA_2007)
s7_29
Out[1309]:
1350
In [1310]:
df_st_GJ_2007 = df_2007.loc[(df_2007["State"]=="GUJARAT")]

df_st_GJ_2007
Out[1310]:
State Year Type Gender Age_group Total
67411 GUJARAT 2007 Bankruptcy or Sudden change in Economic Male 30-44 29
67412 GUJARAT 2007 Illness (Aids/STD) Female 60+ 2
67413 GUJARAT 2007 Illness (Aids/STD) Male 0-14 0
67414 GUJARAT 2007 Insanity/Mental Illness Male 30-44 137
67415 GUJARAT 2007 Others Male 0-14 12
... ... ... ... ... ... ...
231619 GUJARAT 2007 By Jumping from (Other sites) Female 30-44 1
231620 GUJARAT 2007 By Self Infliction of injury Male 15-29 1
231621 GUJARAT 2007 Others Female 45-59 16
231622 GUJARAT 2007 Others Male 45-59 56
231623 GUJARAT 2007 Professional Activity Male 60+ 23

566 rows × 6 columns

In [1311]:
t_GJ_2007 = df_st_GJ_2007.loc[:,"Total"]

s7_30 = np.sum(t_GJ_2007)
s7_30
Out[1311]:
27900
In [1312]:
df_st_HR_2007 = df_2007.loc[(df_2007["State"]=="HARYANA")]

df_st_HR_2007
Out[1312]:
State Year Type Gender Age_group Total
73815 HARYANA 2007 Bankruptcy or Sudden change in Economic Female 0-14 0
73816 HARYANA 2007 Dowry Dispute Female 30-44 5
73817 HARYANA 2007 Fall in Social Reputation Male 45-59 2
73818 HARYANA 2007 Family Problems Female 45-59 24
73819 HARYANA 2007 Family Problems Male 30-44 143
... ... ... ... ... ... ...
231807 HARYANA 2007 Service (Private) Female 15-29 18
231808 HARYANA 2007 Student Female 30-44 3
231809 HARYANA 2007 Student Female 45-59 1
231810 HARYANA 2007 Unemployed Male 45-59 32
231811 HARYANA 2007 Never Married Male 0-100+ 384

566 rows × 6 columns

In [1313]:
t_HR_2007 = df_st_HR_2007.loc[:,"Total"]

s7_31 = np.sum(t_HR_2007)
s7_31
Out[1313]:
12165
In [1314]:
df_st_HP_2007 = df_2007.loc[(df_2007["State"]=="HIMACHAL PRADESH")]

df_st_HP_2007
Out[1314]:
State Year Type Gender Age_group Total
79721 HIMACHAL PRADESH 2007 Causes Not known Male 60+ 4
79722 HIMACHAL PRADESH 2007 Dowry Dispute Female 0-14 0
79723 HIMACHAL PRADESH 2007 Drug Abuse/Addiction Female 30-44 0
79724 HIMACHAL PRADESH 2007 Family Problems Female 0-14 0
79725 HIMACHAL PRADESH 2007 Ideological Causes/Hero Worshipping Female 0-14 0
... ... ... ... ... ... ...
232055 HIMACHAL PRADESH 2007 By touching electric wires Female 15-29 0
232056 HIMACHAL PRADESH 2007 Others Female 15-29 11
232057 HIMACHAL PRADESH 2007 Service (Private) Male 60+ 1
232058 HIMACHAL PRADESH 2007 Unemployed Female 0-14 0
232059 HIMACHAL PRADESH 2007 Unemployed Male 45-59 3

564 rows × 6 columns

In [1315]:
t_HP_2007 = df_st_HP_2007.loc[:,"Total"]

s7_32 = np.sum(t_HP_2007)
s7_32
Out[1315]:
2010
In [1316]:
df_st_JK_2007 = df_2007.loc[(df_2007["State"]=="JAMMU & KASHMIR")]

df_st_JK_2007
Out[1316]:
State Year Type Gender Age_group Total
86989 JAMMU & KASHMIR 2007 Cancellation/Non-Settlement of Marriage Female 45-59 0
86990 JAMMU & KASHMIR 2007 Illness (Aids/STD) Female 30-44 0
86991 JAMMU & KASHMIR 2007 Love Affairs Male 60+ 0
86992 JAMMU & KASHMIR 2007 Paralysis Female 60+ 0
86993 JAMMU & KASHMIR 2007 Professional/Career Problem Male 15-29 0
... ... ... ... ... ... ...
232279 JAMMU & KASHMIR 2007 Others Female 60+ 1
232280 JAMMU & KASHMIR 2007 By touching electric wires Male 60+ 0
232281 JAMMU & KASHMIR 2007 House Wife Female 0-14 0
232282 JAMMU & KASHMIR 2007 Retired Person Male 60+ 2
232283 JAMMU & KASHMIR 2007 Unemployed Male 0-14 0

562 rows × 6 columns

In [1317]:
t_JK_2007 = df_st_JK_2007.loc[:,"Total"]

s7_33 = np.sum(t_JK_2007)
s7_33
Out[1317]:
1170
In [1318]:
df_st_JH_2007 = df_2007.loc[(df_2007["State"]=="JHARKHAND")]

df_st_JH_2007
Out[1318]:
State Year Type Gender Age_group Total
91799 JHARKHAND 2007 Divorce Male 60+ 0
91800 JHARKHAND 2007 Insanity/Mental Illness Male 30-44 22
91801 JHARKHAND 2007 Others Male 0-14 28
91802 JHARKHAND 2007 Paralysis Female 60+ 0
91803 JHARKHAND 2007 Property Dispute Male 15-29 0
... ... ... ... ... ... ...
232512 JHARKHAND 2007 Service (Government) Male 15-29 6
232513 JHARKHAND 2007 Service (Private) Male 15-29 28
232514 JHARKHAND 2007 Service (Private) Male 60+ 3
232515 JHARKHAND 2007 Student Female 15-29 23
232516 JHARKHAND 2007 Never Married Male 0-100+ 232

565 rows × 6 columns

In [1319]:
t_JH_2007 = df_st_JH_2007.loc[:,"Total"]

s7_34 = np.sum(t_JH_2007)
s7_34
Out[1319]:
6427
In [1320]:
df_st_KN_2007 = df_2007.loc[(df_2007["State"]=="KARNATAKA")]

df_st_KN_2007
Out[1320]:
State Year Type Gender Age_group Total
98886 KARNATAKA 2007 Bankruptcy or Sudden change in Economic Female 30-44 4
98887 KARNATAKA 2007 Cancellation/Non-Settlement of Marriage Female 60+ 0
98888 KARNATAKA 2007 Death of Dear Person Male 15-29 5
98889 KARNATAKA 2007 Drug Abuse/Addiction Male 15-29 5
98890 KARNATAKA 2007 Fall in Social Reputation Female 60+ 0
... ... ... ... ... ... ...
232679 KARNATAKA 2007 By touching electric wires Female 45-59 0
232680 KARNATAKA 2007 Others Male 45-59 670
232681 KARNATAKA 2007 Professional Activity Female 0-14 0
232682 KARNATAKA 2007 Public Sector Undertaking Female 0-14 0
232683 KARNATAKA 2007 Public Sector Undertaking Female 15-29 9

566 rows × 6 columns

In [1321]:
t_KN_2007 = df_st_KN_2007.loc[:,"Total"]

s7_35 = np.sum(t_KN_2007)
s7_35
Out[1321]:
61520
In [1322]:
df_st_KER_2007 = df_2007.loc[(df_2007["State"]=="KERALA")]

df_st_KER_2007
Out[1322]:
State Year Type Gender Age_group Total
103730 KERALA 2007 Cancellation/Non-Settlement of Marriage Female 45-59 1
103731 KERALA 2007 Causes Not known Female 30-44 66
103732 KERALA 2007 Divorce Male 45-59 2
103733 KERALA 2007 Drug Abuse/Addiction Female 30-44 0
103734 KERALA 2007 Drug Abuse/Addiction Male 45-59 44
... ... ... ... ... ... ...
232876 KERALA 2007 By Jumping from (Other sites) Male 0-14 0
232877 KERALA 2007 By Over Alcoholism Male 0-14 0
232878 KERALA 2007 Self-employed (Business activity) Female 45-59 6
232879 KERALA 2007 Student Male 45-59 0
232880 KERALA 2007 Divorcee Male 0-100+ 40

566 rows × 6 columns

In [1323]:
t_KER_2007 = df_st_KER_2007.loc[:,"Total"]

s7_36 = np.sum(t_KER_2007)
s7_36
Out[1323]:
44810
In [1324]:
df_st_LD_2007 = df_2007.loc[(df_2007["State"]=="LAKSHADWEEP")]

df_st_LD_2007
Out[1324]:
State Year Type Gender Age_group Total
110268 LAKSHADWEEP 2007 Causes Not known Female 60+ 0
110269 LAKSHADWEEP 2007 Causes Not known Male 45-59 0
110270 LAKSHADWEEP 2007 Dowry Dispute Male 45-59 0
110271 LAKSHADWEEP 2007 Fall in Social Reputation Female 60+ 0
110272 LAKSHADWEEP 2007 Illegitimate Pregnancy Female 45-59 0
... ... ... ... ... ... ...
233095 LAKSHADWEEP 2007 By Jumping from (Other sites) Male 45-59 0
233096 LAKSHADWEEP 2007 Professional Activity Male 15-29 0
233097 LAKSHADWEEP 2007 Public Sector Undertaking Male 15-29 0
233098 LAKSHADWEEP 2007 Public Sector Undertaking Male 60+ 0
233099 LAKSHADWEEP 2007 Self-employed (Business activity) Male 15-29 0

556 rows × 6 columns

In [1325]:
t_LD_2007 = df_st_LD_2007.loc[:,"Total"]

s7_37 = np.sum(t_LD_2007)
s7_37
Out[1325]:
15
In [1326]:
df_st_MP_2007 = df_2007.loc[(df_2007["State"]=="MADHYA PRADESH")]

df_st_MP_2007
Out[1326]:
State Year Type Gender Age_group Total
114234 MADHYA PRADESH 2007 Cancellation/Non-Settlement of Marriage Male 15-29 19
114235 MADHYA PRADESH 2007 Divorce Female 60+ 0
114236 MADHYA PRADESH 2007 Dowry Dispute Female 15-29 477
115312 MADHYA PRADESH 2007 Cancellation/Non-Settlement of Marriage Male 30-44 10
115313 MADHYA PRADESH 2007 Causes Not known Male 60+ 77
... ... ... ... ... ... ...
233313 MADHYA PRADESH 2007 By Overdose of sleeping pills Male 15-29 11
233314 MADHYA PRADESH 2007 Farming/Agriculture Activity Female 30-44 67
233315 MADHYA PRADESH 2007 House Wife Male 0-14 0
233316 MADHYA PRADESH 2007 Others Female 0-14 35
233317 MADHYA PRADESH 2007 Others Female 15-29 53

566 rows × 6 columns

In [1327]:
t_MP_2007 = df_st_MP_2007.loc[:,"Total"]

s7_38 = np.sum(t_MP_2007)
s7_38
Out[1327]:
31645
In [1328]:
df_st_MH_2007 = df_2007.loc[(df_2007["State"]=="MAHARASHTRA")]

df_st_MH_2007
Out[1328]:
State Year Type Gender Age_group Total
120936 MAHARASHTRA 2007 Insanity/Mental Illness Male 15-29 293
120937 MAHARASHTRA 2007 Love Affairs Male 15-29 108
120938 MAHARASHTRA 2007 Love Affairs Male 30-44 18
120939 MAHARASHTRA 2007 Others Male 30-44 144
120940 MAHARASHTRA 2007 Other Prolonged Illness Male 30-44 535
... ... ... ... ... ... ...
233550 MAHARASHTRA 2007 By Overdose of sleeping pills Female 45-59 0
233551 MAHARASHTRA 2007 Retired Person Female 0-14 0
233552 MAHARASHTRA 2007 Service (Government) Female 45-59 1
233553 MAHARASHTRA 2007 Service (Government) Male 45-59 78
233554 MAHARASHTRA 2007 Student Female 60+ 0

566 rows × 6 columns

In [1329]:
t_MH_2007 = df_st_MH_2007.loc[:,"Total"]

s7_39 = np.sum(t_MH_2007)
s7_39
Out[1329]:
75920
In [1330]:
df_st_MN_2007 = df_2007.loc[(df_2007["State"]=="MANIPUR")]

df_st_MN_2007
Out[1330]:
State Year Type Gender Age_group Total
126471 MANIPUR 2007 Bankruptcy or Sudden change in Economic Male 45-59 0
127628 MANIPUR 2007 Cancer Female 0-14 0
127629 MANIPUR 2007 Death of Dear Person Male 0-14 0
127630 MANIPUR 2007 Family Problems Female 45-59 0
127631 MANIPUR 2007 Family Problems Male 30-44 0
... ... ... ... ... ... ...
233760 MANIPUR 2007 Others Female 0-14 0
233761 MANIPUR 2007 Others Male 30-44 2
233762 MANIPUR 2007 Others Male 45-59 0
233763 MANIPUR 2007 Service (Government) Female 30-44 0
233764 MANIPUR 2007 Unemployed Male 60+ 0

558 rows × 6 columns

In [1331]:
t_MN_2007 = df_st_MN_2007.loc[:,"Total"]

s7_40 = np.sum(t_MN_2007)
s7_40
Out[1331]:
195
In [1332]:
df_st_MG_2007 = df_2007.loc[(df_2007["State"]=="MEGHALAYA")]

df_st_MG_2007
Out[1332]:
State Year Type Gender Age_group Total
132691 MEGHALAYA 2007 Bankruptcy or Sudden change in Economic Male 60+ 0
132692 MEGHALAYA 2007 Causes Not known Male 30-44 10
132693 MEGHALAYA 2007 Death of Dear Person Female 0-14 0
132694 MEGHALAYA 2007 Dowry Dispute Male 60+ 0
132695 MEGHALAYA 2007 Drug Abuse/Addiction Female 0-14 0
... ... ... ... ... ... ...
233956 MEGHALAYA 2007 Others Female 0-14 0
233957 MEGHALAYA 2007 Others Male 30-44 2
233958 MEGHALAYA 2007 Others Male 45-59 0
233959 MEGHALAYA 2007 Others Male 45-59 3
233960 MEGHALAYA 2007 Service (Government) Female 30-44 0

561 rows × 6 columns

In [1333]:
t_MG_2007 = df_st_MG_2007.loc[:,"Total"]

s7_41 = np.sum(t_MG_2007)
s7_41
Out[1333]:
435
In [1334]:
df_st_MZ_2007 = df_2007.loc[(df_2007["State"]=="MIZORAM")]

df_st_MZ_2007
Out[1334]:
State Year Type Gender Age_group Total
137770 MIZORAM 2007 Drug Abuse/Addiction Male 60+ 0
137771 MIZORAM 2007 Failure in Examination Female 15-29 0
137772 MIZORAM 2007 Illegitimate Pregnancy Female 45-59 0
137773 MIZORAM 2007 Illness (Aids/STD) Male 0-14 0
137774 MIZORAM 2007 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
... ... ... ... ... ... ...
234159 MIZORAM 2007 By Fire/Self Immolation Female 60+ 0
234160 MIZORAM 2007 By Jumping from (Building) Female 45-59 0
234161 MIZORAM 2007 Others Male 60+ 0
234162 MIZORAM 2007 Service (Private) Female 0-14 0
234163 MIZORAM 2007 Service (Private) Male 45-59 0

563 rows × 6 columns

In [1335]:
t_MN_2007 = df_st_MN_2007.loc[:,"Total"]

s7_42 = np.sum(t_MN_2007)
s7_42
Out[1335]:
195
In [1336]:
df_st_NG_2007 = df_2007.loc[(df_2007["State"]=="NAGALAND")]

df_st_NG_2007
Out[1336]:
State Year Type Gender Age_group Total
144588 NAGALAND 2007 Dowry Dispute Male 0-14 0
144589 NAGALAND 2007 Love Affairs Male 45-59 0
144590 NAGALAND 2007 Paralysis Female 45-59 0
144591 NAGALAND 2007 Paralysis Male 30-44 0
144592 NAGALAND 2007 Property Dispute Female 15-29 0
... ... ... ... ... ... ...
234367 NAGALAND 2007 Others Male 30-44 3
234368 NAGALAND 2007 Others Male 45-59 1
234369 NAGALAND 2007 Others Male 60+ 0
234370 NAGALAND 2007 Retired Person Male 60+ 0
234371 NAGALAND 2007 Seperated Male 0-100+ 0

558 rows × 6 columns

In [1337]:
t_NG_2007 = df_st_NG_2007.loc[:,"Total"]

s7_43 = np.sum(t_NG_2007)
s7_43
Out[1337]:
116
In [1338]:
df_st_OD_2007 = df_2007.loc[(df_2007["State"]=="ODISHA")]

df_st_OD_2007
Out[1338]:
State Year Type Gender Age_group Total
148984 ODISHA 2007 Bankruptcy or Sudden change in Economic Female 0-14 0
148985 ODISHA 2007 Bankruptcy or Sudden change in Economic Male 15-29 1
148986 ODISHA 2007 Insanity/Mental Illness Female 0-14 1
148987 ODISHA 2007 Insanity/Mental Illness Female 15-29 7
148988 ODISHA 2007 Love Affairs Male 60+ 6
... ... ... ... ... ... ...
234560 ODISHA 2007 By touching electric wires Female 30-44 1
234561 ODISHA 2007 Professional Activity Male 30-44 29
234562 ODISHA 2007 Professional Activity Male 45-59 21
234563 ODISHA 2007 Self-employed (Business activity) Male 60+ 23
234564 ODISHA 2007 Unemployed Male 30-44 62

566 rows × 6 columns

In [1339]:
t_OD_2007 = df_st_OD_2007.loc[:,"Total"]

s7_44 = np.sum(t_OD_2007)
s7_44
Out[1339]:
21540
In [1340]:
df_st_PD_2007 = df_2007.loc[(df_2007["State"]=="PUDUCHERRY")]

df_st_PD_2007
Out[1340]:
State Year Type Gender Age_group Total
153433 PUDUCHERRY 2007 Causes Not known Female 0-14 0
155534 PUDUCHERRY 2007 Causes Not known Male 45-59 3
155535 PUDUCHERRY 2007 Death of Dear Person Male 30-44 4
155536 PUDUCHERRY 2007 Drug Abuse/Addiction Male 0-14 0
155537 PUDUCHERRY 2007 Fall in Social Reputation Female 45-59 0
... ... ... ... ... ... ...
234791 PUDUCHERRY 2007 Professional Activity Male 60+ 0
234792 PUDUCHERRY 2007 Public Sector Undertaking Male 30-44 0
234793 PUDUCHERRY 2007 Service (Private) Male 30-44 10
234794 PUDUCHERRY 2007 Student Female 45-59 0
234795 PUDUCHERRY 2007 Never Married Female 0-100+ 74

562 rows × 6 columns

In [1341]:
t_PD_2007 = df_st_PD_2007.loc[:,"Total"]

s7_45 = np.sum(t_PD_2007)
s7_45
Out[1341]:
2585
In [1342]:
df_st_PB_2007 = df_2007.loc[(df_2007["State"]=="PUNJAB")]

df_st_PB_2007
Out[1342]:
State Year Type Gender Age_group Total
160007 PUNJAB 2007 Bankruptcy or Sudden change in Economic Male 30-44 6
160008 PUNJAB 2007 Causes Not known Male 15-29 57
160009 PUNJAB 2007 Dowry Dispute Male 15-29 0
160010 PUNJAB 2007 Dowry Dispute Male 60+ 0
160011 PUNJAB 2007 Illness (Aids/STD) Male 0-14 0
... ... ... ... ... ... ...
234977 PUNJAB 2007 Professional Activity Female 0-14 0
234978 PUNJAB 2007 Public Sector Undertaking Female 0-14 0
234979 PUNJAB 2007 Service (Private) Female 60+ 0
234980 PUNJAB 2007 Service (Private) Male 45-59 13
234981 PUNJAB 2007 Divorcee Male 0-100+ 0

565 rows × 6 columns

In [1343]:
t_PB_2007 = df_st_PB_2007.loc[:,"Total"]

s7_46 = np.sum(t_PB_2007)
s7_46
Out[1343]:
4235
In [1344]:
df_st_RJ_2007 = df_2007.loc[(df_2007["State"]=="RAJASTHAN")]

df_st_RJ_2007
Out[1344]:
State Year Type Gender Age_group Total
164662 RAJASTHAN 2007 Death of Dear Person Male 15-29 0
164663 RAJASTHAN 2007 Divorce Male 30-44 10
164664 RAJASTHAN 2007 Failure in Examination Male 60+ 0
164665 RAJASTHAN 2007 Insanity/Mental Illness Male 45-59 65
164666 RAJASTHAN 2007 Paralysis Female 60+ 0
... ... ... ... ... ... ...
235180 RAJASTHAN 2007 Others Female 60+ 0
235181 RAJASTHAN 2007 Self-employed (Business activity) Female 30-44 0
235182 RAJASTHAN 2007 Service (Private) Male 0-14 6
235183 RAJASTHAN 2007 Service (Private) Male 45-59 82
235184 RAJASTHAN 2007 Seperated Male 0-100+ 18

566 rows × 6 columns

In [1345]:
t_RJ_2007 = df_st_RJ_2007.loc[:,"Total"]

s7_47 = np.sum(t_RJ_2007)
s7_47
Out[1345]:
22185
In [1346]:
df_st_SM_2007 = df_2007.loc[(df_2007["State"]=="SIKKIM")]

df_st_SM_2007
Out[1346]:
State Year Type Gender Age_group Total
171503 SIKKIM 2007 Bankruptcy or Sudden change in Economic Female 45-59 0
171504 SIKKIM 2007 Failure in Examination Female 15-29 0
171505 SIKKIM 2007 Fall in Social Reputation Female 60+ 0
171506 SIKKIM 2007 Illness (Aids/STD) Male 60+ 0
171507 SIKKIM 2007 Love Affairs Female 0-14 0
... ... ... ... ... ... ...
235416 SIKKIM 2007 Others Male 0-14 0
235417 SIKKIM 2007 By Over Alcoholism Male 30-44 0
235418 SIKKIM 2007 Farming/Agriculture Activity Male 0-14 0
235419 SIKKIM 2007 Student Female 30-44 0
235420 SIKKIM 2007 Student Female 60+ 0

565 rows × 6 columns

In [1347]:
t_SM_2007 = df_st_SM_2007.loc[:,"Total"]

s7_48 = np.sum(t_SM_2007)
s7_48
Out[1347]:
610
In [1348]:
df_st_TN_2007 = df_2007.loc[(df_2007["State"]=="TAMIL NADU")]

df_st_TN_2007
Out[1348]:
State Year Type Gender Age_group Total
175757 TAMIL NADU 2007 Death of Dear Person Male 45-59 17
175758 TAMIL NADU 2007 Failure in Examination Male 15-29 76
175759 TAMIL NADU 2007 Family Problems Female 30-44 595
175760 TAMIL NADU 2007 Illegitimate Pregnancy Male 15-29 0
175761 TAMIL NADU 2007 Physical Abuse (Rape/Incest Etc.) Male 15-29 0
... ... ... ... ... ... ...
235638 TAMIL NADU 2007 By Jumping off Moving Vehicles/Trains Male 0-14 0
235639 TAMIL NADU 2007 Farming/Agriculture Activity Female 30-44 42
235640 TAMIL NADU 2007 Public Sector Undertaking Male 30-44 124
235641 TAMIL NADU 2007 Service (Private) Female 45-59 61
235642 TAMIL NADU 2007 Unemployed Female 45-59 90

565 rows × 6 columns

In [1349]:
t_TN_2007 = df_st_TN_2007.loc[:,"Total"]

s7_49 = np.sum(t_TN_2007)
s7_49
Out[1349]:
69055
In [1350]:
df_st_TP_2007 = df_2007.loc[(df_2007["State"]=="TRIPURA")]

df_st_TP_2007
Out[1350]:
State Year Type Gender Age_group Total
181294 TRIPURA 2007 Dowry Dispute Female 30-44 23
181295 TRIPURA 2007 Dowry Dispute Female 60+ 0
181296 TRIPURA 2007 Family Problems Male 0-14 4
181297 TRIPURA 2007 Ideological Causes/Hero Worshipping Female 60+ 0
181298 TRIPURA 2007 Ideological Causes/Hero Worshipping Male 60+ 0
... ... ... ... ... ... ...
235851 TRIPURA 2007 By Jumping from (Building) Female 15-29 0
235852 TRIPURA 2007 Others Male 15-29 1
235853 TRIPURA 2007 Professional Activity Male 0-14 0
235854 TRIPURA 2007 Service (Government) Male 0-14 0
235855 TRIPURA 2007 Service (Private) Male 60+ 0

566 rows × 6 columns

In [1351]:
t_TP_2007 = df_st_TP_2007.loc[:,"Total"]

s7_50 = np.sum(t_TP_2007)
s7_50
Out[1351]:
3525
In [1352]:
df_st_UP_2007 = df_2007.loc[(df_2007["State"]=="UTTAR PRADESH")]

df_st_UP_2007
Out[1352]:
State Year Type Gender Age_group Total
185620 UTTAR PRADESH 2007 Bankruptcy or Sudden change in Economic Female 30-44 3
185621 UTTAR PRADESH 2007 Cancer Female 30-44 2
185622 UTTAR PRADESH 2007 Not having Children(Barrenness/Impotency Female 45-59 6
185623 UTTAR PRADESH 2007 Not having Children(Barrenness/Impotency Male 30-44 6
185624 UTTAR PRADESH 2007 Paralysis Female 15-29 2
... ... ... ... ... ... ...
236037 UTTAR PRADESH 2007 Self-employed (Business activity) Female 30-44 5
236038 UTTAR PRADESH 2007 Self-employed (Business activity) Female 45-59 0
236039 UTTAR PRADESH 2007 Self-employed (Business activity) Male 45-59 46
236040 UTTAR PRADESH 2007 Student Male 0-14 18
236041 UTTAR PRADESH 2007 Student Male 45-59 0

564 rows × 6 columns

In [1353]:
t_UP_2007 = df_st_UP_2007.loc[:,"Total"]

s7_51 = np.sum(t_UP_2007)
s7_51
Out[1353]:
19610
In [1354]:
df_st_UK_2007 = df_2007.loc[(df_2007["State"]=="UTTARAKHAND")]

df_st_UK_2007
Out[1354]:
State Year Type Gender Age_group Total
192247 UTTARAKHAND 2007 Bankruptcy or Sudden change in Economic Female 15-29 1
192248 UTTARAKHAND 2007 Causes Not known Female 60+ 2
192249 UTTARAKHAND 2007 Divorce Female 45-59 0
192250 UTTARAKHAND 2007 Dowry Dispute Male 60+ 0
192251 UTTARAKHAND 2007 Illness (Aids/STD) Male 0-14 0
... ... ... ... ... ... ...
236264 UTTARAKHAND 2007 By Jumping off Moving Vehicles/Trains Male 60+ 0
236265 UTTARAKHAND 2007 By Machine Male 0-14 0
236266 UTTARAKHAND 2007 House Wife Male 0-14 0
236267 UTTARAKHAND 2007 Public Sector Undertaking Female 15-29 3
236268 UTTARAKHAND 2007 Public Sector Undertaking Female 60+ 0

563 rows × 6 columns

In [1355]:
t_UK_2007 = df_st_UK_2007.loc[:,"Total"]

s7_52 = np.sum(t_UK_2007)
s7_52
Out[1355]:
1238
In [1356]:
df_st_WB_2007 = df_2007.loc[(df_2007["State"]=="WEST BENGAL")]

df_st_WB_2007
Out[1356]:
State Year Type Gender Age_group Total
198414 WEST BENGAL 2007 Love Affairs Female 60+ 0
198415 WEST BENGAL 2007 Not having Children(Barrenness/Impotency Female 30-44 40
198416 WEST BENGAL 2007 Poverty Male 30-44 12
198417 WEST BENGAL 2007 Professional/Career Problem Male 45-59 19
198418 WEST BENGAL 2007 By Over Alcoholism Male 15-29 20
... ... ... ... ... ... ...
236496 WEST BENGAL 2007 By touching electric wires Male 45-59 8
236497 WEST BENGAL 2007 Others Male 15-29 562
236498 WEST BENGAL 2007 Others Male 45-59 297
236499 WEST BENGAL 2007 Retired Person Female 30-44 0
236500 WEST BENGAL 2007 Service (Government) Male 60+ 2

566 rows × 6 columns

In [1357]:
t_WB_2007 = df_st_WB_2007.loc[:,"Total"]

s7_53 = np.sum(t_WB_2007)
s7_53
Out[1357]:
74300
In [1358]:
t_ANm_2007 = np.sum(df_st_AN_2007.where(df_st_AN_2007["Gender"]=="Male")["Total"])
t_ANm_2007
Out[1358]:
495.0
In [1359]:
t_ANfm_2007 = np.sum(df_st_AN_2007.where(df_st_AN_2007["Gender"]=="Female")["Total"])
t_ANfm_2007
Out[1359]:
280.0
In [1360]:
t_APm_2007 = np.sum(df_st_AP_2007.where(df_st_AP_2007["Gender"]=="Male")["Total"])
t_APm_2007
Out[1360]:
49745.0
In [1361]:
t_APfm_2007 = np.sum(df_st_AP_2007.where(df_st_AP_2007["Gender"]=="Female")["Total"])
t_APfm_2007
Out[1361]:
24665.0
In [1362]:
t_ARPm_2007 = np.sum(df_st_ARP_2007.where(df_st_ARP_2007["Gender"]=="Male")["Total"])
t_ARPm_2007
Out[1362]:
490.0
In [1363]:
t_ARPfm_2007 = np.sum(df_st_ARP_2007.where(df_st_ARP_2007["Gender"]=="Female")["Total"])
t_ARPfm_2007
Out[1363]:
154.0
In [1364]:
t_ASm_2007 = np.sum(df_st_AS_2007.where(df_st_AS_2007["Gender"]=="Male")["Total"])
t_ASm_2007
Out[1364]:
10580.0
In [1365]:
t_ASfm_2007 = np.sum(df_st_AS_2007.where(df_st_AS_2007["Gender"]=="Female")["Total"])
t_ASfm_2007
Out[1365]:
4721.0
In [1366]:
t_BHm_2007 = np.sum(df_st_BH_2007.where(df_st_BH_2007["Gender"]=="Male")["Total"])
t_BHm_2007
Out[1366]:
2670.0
In [1367]:
t_BHfm_2007 = np.sum(df_st_BH_2007.where(df_st_BH_2007["Gender"]=="Female")["Total"])
t_BHfm_2007
Out[1367]:
2155.0
In [1368]:
t_CHm_2007 = np.sum(df_st_CH_2007.where(df_st_CH_2007["Gender"]=="Male")["Total"])
t_CHm_2007
Out[1368]:
298.0
In [1369]:
t_CHfm_2007 = np.sum(df_st_CH_2007.where(df_st_CH_2007["Gender"]=="Female")["Total"])
t_CHfm_2007
Out[1369]:
110.0
In [1370]:
t_CTm_2007 = np.sum(df_st_CT_2007.where(df_st_CT_2007["Gender"]=="Male")["Total"])
t_CTm_2007
Out[1370]:
16280.0
In [1371]:
t_CTfm_2007 = np.sum(df_st_CT_2007.where(df_st_CT_2007["Gender"]=="Female")["Total"])
t_CTfm_2007
Out[1371]:
7915.0
In [1372]:
t_DNm_2007 = np.sum(df_st_DN_2007.where(df_st_DN_2007["Gender"]=="Male")["Total"])
t_DNm_2007
Out[1372]:
220.0
In [1373]:
t_DNfm_2007 = np.sum(df_st_DN_2007.where(df_st_DN_2007["Gender"]=="Female")["Total"])
t_DNfm_2007
Out[1373]:
160.0
In [1374]:
t_DDm_2007 = np.sum(df_st_DD_2007.where(df_st_DD_2007["Gender"]=="Male")["Total"])
t_DDm_2007
Out[1374]:
30.0
In [1375]:
t_DDfm_2007 = np.sum(df_st_DD_2007.where(df_st_DD_2007["Gender"]=="Female")["Total"])
t_DDfm_2007
Out[1375]:
45.0
In [1376]:
t_DLm_2007 = np.sum(df_st_DL_2007.where(df_st_DL_2007["Gender"]=="Male")["Total"])
t_DLm_2007
Out[1376]:
4830.0
In [1377]:
t_DLfm_2007 = np.sum(df_st_DL_2007.where(df_st_DL_2007["Gender"]=="Female")["Total"])
t_DLfm_2007
Out[1377]:
2575.0
In [1378]:
t_GOAm_2007 = np.sum(df_st_GOA_2007.where(df_st_GOA_2007["Gender"]=="Male")["Total"])
t_GOAm_2007
Out[1378]:
890.0
In [1379]:
t_GOAfm_2007 = np.sum(df_st_GOA_2007.where(df_st_GOA_2007["Gender"]=="Female")["Total"])
t_GOAfm_2007
Out[1379]:
460.0
In [1380]:
t_GJm_2007 = np.sum(df_st_GJ_2007.where(df_st_GJ_2007["Gender"]=="Male")["Total"])
t_GJm_2007
Out[1380]:
16875.0
In [1381]:
t_GJfm_2007 = np.sum(df_st_GJ_2007.where(df_st_GJ_2007["Gender"]=="Female")["Total"])
t_GJfm_2007
Out[1381]:
11025.0
In [1382]:
t_HRm_2007 = np.sum(df_st_HR_2007.where(df_st_HR_2007["Gender"]=="Male")["Total"])
t_HRm_2007
Out[1382]:
9260.0
In [1383]:
t_HRfm_2007 = np.sum(df_st_HR_2007.where(df_st_HR_2007["Gender"]=="Female")["Total"])
t_HRfm_2007
Out[1383]:
2905.0
In [1384]:
t_HPm_2007 = np.sum(df_st_HP_2007.where(df_st_HP_2007["Gender"]=="Male")["Total"])
t_HPm_2007
Out[1384]:
1290.0
In [1385]:
t_HPfm_2007 = np.sum(df_st_HP_2007.where(df_st_HP_2007["Gender"]=="Female")["Total"])
t_HPfm_2007
Out[1385]:
720.0
In [1386]:
t_JKm_2007 = np.sum(df_st_JK_2007.where(df_st_JK_2007["Gender"]=="Male")["Total"])
t_JKm_2007
Out[1386]:
765.0
In [1387]:
t_JKfm_2007 = np.sum(df_st_JK_2007.where(df_st_JK_2007["Gender"]=="Female")["Total"])
t_JKfm_2007
Out[1387]:
405.0
In [1388]:
t_JHm_2007 = np.sum(df_st_JH_2007.where(df_st_JH_2007["Gender"]=="Male")["Total"])
t_JHm_2007
Out[1388]:
4400.0
In [1389]:
t_JHfm_2007 = np.sum(df_st_JH_2007.where(df_st_JH_2007["Gender"]=="Female")["Total"])
t_JHfm_2007
Out[1389]:
2027.0
In [1390]:
t_KNm_2007 = np.sum(df_st_KN_2007.where(df_st_KN_2007["Gender"]=="Male")["Total"])
t_KNm_2007
Out[1390]:
41960.0
In [1391]:
t_KNfm_2007 = np.sum(df_st_KN_2007.where(df_st_KN_2007["Gender"]=="Female")["Total"])
t_KNfm_2007
Out[1391]:
19560.0
In [1392]:
t_KERm_2007 = np.sum(df_st_KER_2007.where(df_st_KER_2007["Gender"]=="Male")["Total"])
t_KERm_2007
Out[1392]:
32940.0
In [1393]:
t_KERfm_2007 = np.sum(df_st_KER_2007.where(df_st_KER_2007["Gender"]=="Female")["Total"])
t_KERfm_2007
Out[1393]:
11870.0
In [1394]:
t_LDm_2007 = np.sum(df_st_LD_2007.where(df_st_LD_2007["Gender"]=="Male")["Total"])
t_LDm_2007
Out[1394]:
5.0
In [1395]:
t_LDfm_2007 = np.sum(df_st_LD_2007.where(df_st_LD_2007["Gender"]=="Female")["Total"])
t_LDfm_2007
Out[1395]:
10.0
In [1396]:
t_MPm_2007 = np.sum(df_st_MP_2007.where(df_st_MP_2007["Gender"]=="Male")["Total"])
t_MPm_2007
Out[1396]:
17350.0
In [1397]:
t_MPfm_2007 = np.sum(df_st_MP_2007.where(df_st_MP_2007["Gender"]=="Female")["Total"])
t_MPfm_2007
Out[1397]:
14295.0
In [1398]:
t_MHm_2007 = np.sum(df_st_MH_2007.where(df_st_MH_2007["Gender"]=="Male")["Total"])
t_MHm_2007
Out[1398]:
52100.0
In [1399]:
t_MHfm_2007 = np.sum(df_st_MH_2007.where(df_st_MH_2007["Gender"]=="Female")["Total"])
t_MHfm_2007
Out[1399]:
23820.0
In [1400]:
t_MNm_2007 = np.sum(df_st_MN_2007.where(df_st_MN_2007["Gender"]=="Male")["Total"])
t_MNm_2007
Out[1400]:
140.0
In [1401]:
t_MNfm_2007 = np.sum(df_st_MN_2007.where(df_st_MN_2007["Gender"]=="Female")["Total"])
t_MNfm_2007
Out[1401]:
55.0
In [1402]:
t_MGm_2007 = np.sum(df_st_MG_2007.where(df_st_MG_2007["Gender"]=="Male")["Total"])
t_MGm_2007
Out[1402]:
300.0
In [1403]:
t_MGfm_2007 = np.sum(df_st_MG_2007.where(df_st_MG_2007["Gender"]=="Female")["Total"])
t_MGfm_2007
Out[1403]:
135.0
In [1404]:
t_MZm_2007 = np.sum(df_st_MZ_2007.where(df_st_MZ_2007["Gender"]=="Male")["Total"])
t_MZm_2007
Out[1404]:
110.0
In [1405]:
t_MZfm_2007 = np.sum(df_st_MZ_2007.where(df_st_MZ_2007["Gender"]=="Female")["Total"])
t_MZfm_2007
Out[1405]:
30.0
In [1406]:
t_NGm_2007 = np.sum(df_st_NG_2007.where(df_st_NG_2007["Gender"]=="Male")["Total"])
t_NGm_2007
Out[1406]:
82.0
In [1407]:
t_NGfm_2007 = np.sum(df_st_NG_2007.where(df_st_NG_2007["Gender"]=="Female")["Total"])
t_MGfm_2007
Out[1407]:
135.0
In [1408]:
t_ODm_2007 = np.sum(df_st_OD_2007.where(df_st_OD_2007["Gender"]=="Male")["Total"])
t_ODm_2007
Out[1408]:
12440.0
In [1409]:
t_ODfm_2007 = np.sum(df_st_OD_2007.where(df_st_OD_2007["Gender"]=="Female")["Total"])
t_ODfm_2007
Out[1409]:
9100.0
In [1410]:
t_PDm_2007 = np.sum(df_st_PD_2007.where(df_st_PD_2007["Gender"]=="Male")["Total"])
t_PDm_2007
Out[1410]:
1595.0
In [1411]:
t_PDfm_2007 = np.sum(df_st_PD_2007.where(df_st_PD_2007["Gender"]=="Female")["Total"])
t_PDfm_2007
Out[1411]:
990.0
In [1412]:
t_PBm_2007 = np.sum(df_st_PB_2007.where(df_st_PB_2007["Gender"]=="Male")["Total"])
t_PBm_2007
Out[1412]:
3160.0
In [1413]:
t_PBfm_2007 = np.sum(df_st_PB_2007.where(df_st_PB_2007["Gender"]=="Female")["Total"])
t_PBfm_2007
Out[1413]:
1075.0
In [1414]:
t_RJm_2007 = np.sum(df_st_RJ_2007.where(df_st_RJ_2007["Gender"]=="Male")["Total"])
t_RJm_2007
Out[1414]:
15770.0
In [1415]:
t_RJfm_2007 = np.sum(df_st_RJ_2007.where(df_st_RJ_2007["Gender"]=="Female")["Total"])
t_RJfm_2007
Out[1415]:
6415.0
In [1416]:
t_SMm_2007 = np.sum(df_st_SM_2007.where(df_st_SM_2007["Gender"]=="Male")["Total"])
t_SMm_2007
Out[1416]:
420.0
In [1417]:
t_SMfm_2007 = np.sum(df_st_SM_2007.where(df_st_SM_2007["Gender"]=="Female")["Total"])
t_SMfm_2007
Out[1417]:
190.0
In [1418]:
t_TNm_2007 = np.sum(df_st_TN_2007.where(df_st_TN_2007["Gender"]=="Male")["Total"])
t_TNm_2007
Out[1418]:
43435.0
In [1419]:
t_TNfm_2007 = np.sum(df_st_TN_2007.where(df_st_TN_2007["Gender"]=="Female")["Total"])
t_TNfm_2007
Out[1419]:
25620.0
In [1420]:
t_TPm_2007 = np.sum(df_st_TP_2007.where(df_st_TP_2007["Gender"]=="Male")["Total"])
t_TPm_2007
Out[1420]:
2095.0
In [1421]:
t_TPfm_2007 = np.sum(df_st_TP_2007.where(df_st_TP_2007["Gender"]=="Female")["Total"])
t_TPfm_2007
Out[1421]:
1430.0
In [1422]:
t_UPm_2007 = np.sum(df_st_UP_2007.where(df_st_UP_2007["Gender"]=="Male")["Total"])
t_UPm_2007
Out[1422]:
10260.0
In [1423]:
t_UPfm_2007 = np.sum(df_st_UP_2007.where(df_st_UP_2007["Gender"]=="Female")["Total"])
t_UPfm_2007
Out[1423]:
9350.0
In [1424]:
t_UKm_2007 = np.sum(df_st_UK_2007.where(df_st_UK_2007["Gender"]=="Male")["Total"])
t_UKm_2007
Out[1424]:
650.0
In [1425]:
t_UKfm_2007 = np.sum(df_st_UK_2007.where(df_st_UK_2007["Gender"]=="Female")["Total"])
t_UKfm_2007
Out[1425]:
588.0
In [1426]:
t_WBm_2007 = np.sum(df_st_WB_2007.where(df_st_WB_2007["Gender"]=="Male")["Total"])
t_WBm_2007
Out[1426]:
42525.0
In [1427]:
t_WBfm_2007 = np.sum(df_st_WB_2007.where(df_st_WB_2007["Gender"]=="Female")["Total"])
t_WBfm_2007
Out[1427]:
31775.0
In [1428]:
l_2007=list(df_2007.loc[:,"Type"].unique())
l_2007.sort()
print(l_2007,end=" ")
['Bankruptcy or Sudden change in Economic', 'By Consuming Insecticides', 'By Consuming Other Poison', 'By Drowning', 'By Fire-Arms', 'By Fire/Self Immolation', 'By Hanging', 'By Jumping from (Building)', 'By Jumping from (Other sites)', 'By Jumping off Moving Vehicles/Trains', 'By Machine', 'By Over Alcoholism', 'By Overdose of sleeping pills', 'By Self Infliction of injury', 'By coming under running vehicles/trains', 'By touching electric wires', 'Cancellation/Non-Settlement of Marriage', 'Cancer', 'Causes Not known', 'Death of Dear Person', 'Diploma', 'Divorce', 'Divorcee', 'Dowry Dispute', 'Drug Abuse/Addiction', 'Failure in Examination', 'Fall in Social Reputation', 'Family Problems', 'Farming/Agriculture Activity', 'Graduate', 'House Wife', 'Hr. Secondary/Intermediate/Pre-Universit', 'Ideological Causes/Hero Worshipping', 'Illegitimate Pregnancy', 'Illness (Aids/STD)', 'Insanity/Mental Illness', 'Love Affairs', 'Married', 'Matriculate/Secondary', 'Middle', 'Never Married', 'No Education', 'Not having Children(Barrenness/Impotency', 'Other Prolonged Illness', 'Others', 'Paralysis', 'Physical Abuse (Rape/Incest Etc.)', 'Post Graduate and Above', 'Poverty', 'Primary', 'Professional Activity', 'Professional/Career Problem', 'Property Dispute', 'Public Sector Undertaking', 'Retired Person', 'Self-employed (Business activity)', 'Seperated', 'Service (Government)', 'Service (Private)', 'Student', 'Suspected/Illicit Relation', 'Unemployed', 'Unemployment', 'Widowed/Widower'] 
In [1429]:
cause_l_2007=[]
for i in l_2007:
    rough= np.sum(df_2007.where(df_2007["Type"]==i)["Total"])
    cause_l_2007.append(rough)

print(cause_l_2007,end=" ")
[3312.0, 24125.0, 18548.0, 8338.0, 719.0, 10391.0, 38861.0, 855.0, 410.0, 658.0, 163.0, 1386.0, 819.0, 277.0, 4406.0, 740.0, 984.0, 794.0, 20409.0, 719.0, 1078.0, 335.0, 1170.0, 3148.0, 2332.0, 1976.0, 1105.0, 29238.0, 16632.0, 2352.0, 24162.0, 9990.0, 261.0, 158.0, 952.0, 8638.0, 3383.0, 87657.0, 21549.0, 29694.0, 25454.0, 26772.0, 801.0, 16452.0, 70477.0, 496.0, 305.0, 351.0, 2809.0, 30851.0, 3235.0, 1273.0, 1411.0, 2647.0, 1048.0, 7280.0, 3348.0, 1857.0, 10068.0, 6248.0, 1299.0, 8511.0, 2394.0, 5008.0] 
In [1430]:
x1_2007 = set(df_2007.loc[:,"State"])
x1_2007
len(x1_2007)
Out[1430]:
35
In [1431]:
cause_df_2007 = pd.DataFrame(cause_l_2007,l_2007)
cause_df_2007.reset_index()
Out[1431]:
index 0
0 Bankruptcy or Sudden change in Economic 3312.0
1 By Consuming Insecticides 24125.0
2 By Consuming Other Poison 18548.0
3 By Drowning 8338.0
4 By Fire-Arms 719.0
... ... ...
59 Student 6248.0
60 Suspected/Illicit Relation 1299.0
61 Unemployed 8511.0
62 Unemployment 2394.0
63 Widowed/Widower 5008.0

64 rows × 2 columns

In [1432]:
cause_df_2007.plot.bar(stacked=True,figsize=(50,20))
plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("Causes",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths due to Different Causes in 2007",fontsize=55)
plt.legend(["Death Count"], prop={"size":30})
Out[1432]:
<matplotlib.legend.Legend at 0x136e508>
In [1433]:
s_2007=list(df_2007.loc[:,"State"].unique())
s_2007.sort()
print(s_2007,end=" ")
['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH', 'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR', 'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA', 'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA', 'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'] 
In [1434]:
state_s_2007 = [s7_19,s7_20,s7_21,s7_22,s7_23,s7_24,s7_25,s7_26,s7_27,s7_28,s7_29,s7_30,s7_31,s7_32,s7_33,s7_34,
           s7_35,s7_36,s7_37,s7_38,s7_39,s7_40,s7_41,s7_42,s7_43,s7_44,s7_45,s7_46,s7_47,s7_48,s7_49,s7_50,
           s7_51,s7_52,s7_53]
print(state_s_2007,end=" ")
[775, 74410, 644, 15301, 4825, 408, 24195, 380, 75, 7405, 1350, 27900, 12165, 2010, 1170, 6427, 61520, 44810, 15, 31645, 75920, 195, 435, 195, 116, 21540, 2585, 4235, 22185, 610, 69055, 3525, 19610, 1238, 74300] 
In [1435]:
state_m_2007=[t_ANm_2007, t_APm_2007, t_ARPm_2007, t_ASm_2007, t_BHm_2007, t_CHm_2007, t_CTm_2007, t_DNm_2007,
             t_DDm_2007, t_DLm_2007, t_GOAm_2007, t_GJm_2007, t_HRm_2007, t_HPm_2007,t_JKm_2007, t_JHm_2007,
             t_KNm_2007, t_KERm_2007, t_LDm_2007,t_MPm_2007,t_MHm_2007,t_MNm_2007,t_MGm_2007,t_MZm_2007,
             t_NGm_2007, t_ODm_2007, t_PDm_2007,t_PBm_2007,t_RJm_2007,t_SMm_2007,t_TNm_2007,t_TPm_2007,
             t_UPm_2007, t_UKm_2007, t_WBm_2007]
print(state_m_2007,end=" ")
[495.0, 49745.0, 490.0, 10580.0, 2670.0, 298.0, 16280.0, 220.0, 30.0, 4830.0, 890.0, 16875.0, 9260.0, 1290.0, 765.0, 4400.0, 41960.0, 32940.0, 5.0, 17350.0, 52100.0, 140.0, 300.0, 110.0, 82.0, 12440.0, 1595.0, 3160.0, 15770.0, 420.0, 43435.0, 2095.0, 10260.0, 650.0, 42525.0] 
In [1436]:
state_fm_2007=[t_ANfm_2007, t_APfm_2007, t_ARPfm_2007, t_ASfm_2007, t_BHfm_2007, t_CHfm_2007, t_CTfm_2007, t_DNfm_2007,
             t_DDfm_2007, t_DLfm_2007, t_GOAfm_2007, t_GJfm_2007, t_HRfm_2007, t_HPfm_2007,t_JKfm_2007, t_JHfm_2007,
             t_KNfm_2007, t_KERfm_2007, t_LDfm_2007,t_MPfm_2007,t_MHfm_2007,t_MNfm_2007,t_MGfm_2007,t_MZfm_2007,
             t_NGfm_2007, t_ODfm_2007, t_PDfm_2007,t_PBfm_2007,t_RJfm_2007,t_SMfm_2007,t_TNfm_2007,t_TPfm_2007,
             t_UPfm_2007, t_UKfm_2007, t_WBfm_2007]
print(state_fm_2007,end=" ")
[280.0, 24665.0, 154.0, 4721.0, 2155.0, 110.0, 7915.0, 160.0, 45.0, 2575.0, 460.0, 11025.0, 2905.0, 720.0, 405.0, 2027.0, 19560.0, 11870.0, 10.0, 14295.0, 23820.0, 55.0, 135.0, 30.0, 34.0, 9100.0, 990.0, 1075.0, 6415.0, 190.0, 25620.0, 1430.0, 9350.0, 588.0, 31775.0] 
In [1437]:
df_state_2007 = {
    
    "State":['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH',
             'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR',
             'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA',
             'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA',
             'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'],
                   
    "Total":[s7_19,s7_20,s7_21,s7_22,s7_23,s7_24,s7_25,s7_26,s7_27,s7_28,s7_29,s7_30,s7_31,s7_32,s7_33,s7_34,
           s7_35,s7_36,s7_37,s7_38,s7_39,s7_40,s7_41,s7_42,s7_43,s7_44,s7_45,s7_46,s7_47,s7_48,s7_49,s7_50,
           s7_51,s7_52,s7_53],
       
    "Male":[t_ANm_2007, t_APm_2007, t_ARPm_2007, t_ASm_2007, t_BHm_2007, t_CHm_2007, t_CTm_2007, t_DNm_2007,
             t_DDm_2007, t_DLm_2007, t_GOAm_2007, t_GJm_2007, t_HRm_2007, t_HPm_2007,t_JKm_2007, t_JHm_2007,
             t_KNm_2007, t_KERm_2007, t_LDm_2007,t_MPm_2007,t_MHm_2007,t_MNm_2007,t_MGm_2007,t_MZm_2007,
             t_NGm_2007, t_ODm_2007, t_PDm_2007,t_PBm_2007,t_RJm_2007,t_SMm_2007,t_TNm_2007,t_TPm_2007,
             t_UPm_2007, t_UKm_2007, t_WBm_2007],
                 
    "Female":[t_ANfm_2007, t_APfm_2007, t_ARPfm_2007, t_ASfm_2007, t_BHfm_2007, t_CHfm_2007, t_CTfm_2007, t_DNfm_2007,
             t_DDfm_2007, t_DLfm_2007, t_GOAfm_2007, t_GJfm_2007, t_HRfm_2007, t_HPfm_2007,t_JKfm_2007, t_JHfm_2007,
             t_KNfm_2007, t_KERfm_2007, t_LDfm_2007,t_MPfm_2007,t_MHfm_2007,t_MNfm_2007,t_MGfm_2007,t_MZfm_2007,
             t_NGfm_2007, t_ODfm_2007, t_PDfm_2007,t_PBfm_2007,t_RJfm_2007,t_SMfm_2007,t_TNfm_2007,t_TPfm_2007,
             t_UPfm_2007, t_UKfm_2007, t_WBfm_2007]
                  

}

df_All_st_2007 = pd.DataFrame(df_state_2007)
df_All_st_2007
Out[1437]:
State Total Male Female
0 A & N ISLANDS 775 495.0 280.0
1 ANDHRA PRADESH 74410 49745.0 24665.0
2 ARUNACHAL PRADESH 644 490.0 154.0
3 ASSAM 15301 10580.0 4721.0
4 BIHAR 4825 2670.0 2155.0
5 CHANDIGARH 408 298.0 110.0
6 CHHATTISGARH 24195 16280.0 7915.0
7 D & N HAVELI 380 220.0 160.0
8 DAMAN & DIU 75 30.0 45.0
9 DELHI (UT) 7405 4830.0 2575.0
10 GOA 1350 890.0 460.0
11 GUJARAT 27900 16875.0 11025.0
12 HARYANA 12165 9260.0 2905.0
13 HIMACHAL PRADESH 2010 1290.0 720.0
14 JAMMU & KASHMIR 1170 765.0 405.0
15 JHARKHAND 6427 4400.0 2027.0
16 KARNATAKA 61520 41960.0 19560.0
17 KERALA 44810 32940.0 11870.0
18 LAKSHADWEEP 15 5.0 10.0
19 MADHYA PRADESH 31645 17350.0 14295.0
20 MAHARASHTRA 75920 52100.0 23820.0
21 MANIPUR 195 140.0 55.0
22 MEGHALAYA 435 300.0 135.0
23 MIZORAM 195 110.0 30.0
24 NAGALAND 116 82.0 34.0
25 ODISHA 21540 12440.0 9100.0
26 PUDUCHERRY 2585 1595.0 990.0
27 PUNJAB 4235 3160.0 1075.0
28 RAJASTHAN 22185 15770.0 6415.0
29 SIKKIM 610 420.0 190.0
30 TAMIL NADU 69055 43435.0 25620.0
31 TRIPURA 3525 2095.0 1430.0
32 UTTAR PRADESH 19610 10260.0 9350.0
33 UTTARAKHAND 1238 650.0 588.0
34 WEST BENGAL 74300 42525.0 31775.0
In [1438]:
pivot_2007 = pd.pivot_table(df_All_st_2007, values=None, index='State', columns=None,
                       fill_value=None, margins=False, dropna=True, margins_name='All', observed=False)

pivot_2007
Out[1438]:
Female Male Total
State
A & N ISLANDS 280.0 495.0 775
ANDHRA PRADESH 24665.0 49745.0 74410
ARUNACHAL PRADESH 154.0 490.0 644
ASSAM 4721.0 10580.0 15301
BIHAR 2155.0 2670.0 4825
CHANDIGARH 110.0 298.0 408
CHHATTISGARH 7915.0 16280.0 24195
D & N HAVELI 160.0 220.0 380
DAMAN & DIU 45.0 30.0 75
DELHI (UT) 2575.0 4830.0 7405
GOA 460.0 890.0 1350
GUJARAT 11025.0 16875.0 27900
HARYANA 2905.0 9260.0 12165
HIMACHAL PRADESH 720.0 1290.0 2010
JAMMU & KASHMIR 405.0 765.0 1170
JHARKHAND 2027.0 4400.0 6427
KARNATAKA 19560.0 41960.0 61520
KERALA 11870.0 32940.0 44810
LAKSHADWEEP 10.0 5.0 15
MADHYA PRADESH 14295.0 17350.0 31645
MAHARASHTRA 23820.0 52100.0 75920
MANIPUR 55.0 140.0 195
MEGHALAYA 135.0 300.0 435
MIZORAM 30.0 110.0 195
NAGALAND 34.0 82.0 116
ODISHA 9100.0 12440.0 21540
PUDUCHERRY 990.0 1595.0 2585
PUNJAB 1075.0 3160.0 4235
RAJASTHAN 6415.0 15770.0 22185
SIKKIM 190.0 420.0 610
TAMIL NADU 25620.0 43435.0 69055
TRIPURA 1430.0 2095.0 3525
UTTAR PRADESH 9350.0 10260.0 19610
UTTARAKHAND 588.0 650.0 1238
WEST BENGAL 31775.0 42525.0 74300
In [1439]:
pivot_2007.plot(kind='bar',figsize=(60,30))

plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("States",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths of Males And Females In Different State",fontsize=55)
plt.legend(["Female","Male","Total"], prop={"size":30})

plt.show
Out[1439]:
<function matplotlib.pyplot.show(close=None, block=None)>
In [1440]:
cause_l_percent_2007=[]
for i in cause_l_2007:
    p=i/np.sum(cause_l_2007)
    avg_2007_cause=p*100
    cause_l_percent_2007.append(avg_2007_cause)

print(cause_l_percent_2007,end=" ")
[0.5401887724895168, 3.934798954199756, 3.025187606321122, 1.3599317587613498, 0.11726924137076163, 1.6947770334959447, 6.33824755063862, 0.13945090594158718, 0.06687119466204766, 0.10732011240884723, 0.026585377390033582, 0.22605725805267818, 0.13357928884930984, 0.04517883151557854, 0.7186206919048341, 0.12069435134125675, 0.1604908671889144, 0.1295017769796728, 3.328717589896904, 0.11726924137076163, 0.17582231181874972, 0.05463865905313651, 0.19082755549901406, 0.5134402946246976, 0.3803503071997443, 0.32228653817611264, 0.18022602463795773, 4.7687316817779255, 2.712687096632138, 0.3836123166954539, 3.940833671766818, 1.6293737431069661, 0.04256922391901083, 0.025769875016106173, 0.15527165199577894, 1.4088619011969945, 0.551768906199286, 14.296898318271003, 3.5146521311523538, 4.843105498280106, 4.151559485189662, 4.366525910956927, 0.13064348030317116, 2.6833290111707515, 11.494832161456422, 0.08089783549359912, 0.04974564480957204, 0.05724826664970421, 0.4581492336724192, 5.031812747606908, 0.5276300359310345, 0.20762690440191872, 0.23013476992231524, 0.43172695675717115, 0.17092929757518524, 1.1873714564383095, 0.546060389581794, 0.3028775816766403, 1.6420955801402337, 1.0190517664596923, 0.21186751674634124, 1.388148140899238, 0.39046253663644415, 0.8168071777256943] 
In [1441]:
np.max(cause_l_percent_2007) #Married
Out[1441]:
14.296898318271003
In [1442]:
np.min(cause_l_percent_2007)  #Ideological Causes/Hero Worshipping
Out[1442]:
0.025769875016106173
In [1443]:
state_s_2007_percent=[]
tot=np.sum(state_s_2007)
for i in state_s_2007:
    xy=i/tot
    avg_state_2007=xy*100
    state_s_2007_percent.append(avg_state_2007)

print(state_s_2007_percent,end=" ")
[0.12639152997354747, 12.13521773591183, 0.10502728426188977, 2.495376516290645, 0.7868892027385376, 0.06653902481188048, 3.9458620228515886, 0.061972621148320056, 0.012231438384536851, 1.2076506831666052, 0.22016589092166333, 4.5500950790477095, 1.9839393059718775, 0.32780254870558767, 0.1908104387987749, 1.0481527266322448, 10.033041192222763, 7.307876720147951, 0.0024462876769073705, 5.160851569048916, 12.381477362053838, 0.031801739799795815, 0.07094234263031375, 0.031801739799795815, 0.018917958034750333, 3.512869104038984, 0.42157690965370354, 0.6906685541135142, 3.618059474146001, 0.0994823655275664, 11.261893035255897, 0.5748776040732321, 3.198113422943569, 0.20190027626742166, 12.11727829294784] 
In [1444]:
np.max(state_s_2007_percent) #Maharashtra
Out[1444]:
12.381477362053838
In [1445]:
np.min(state_s_2007_percent)  #Lakshdweep
Out[1445]:
0.0024462876769073705
In [1446]:
l_age_grp_2007=[s7_4,s7_5,s7_6,s7_7,s7_8,s7_54]
l_age_grp_2007
Out[1446]:
[7410, 129477, 125475, 76699, 28784, 245274]
In [1447]:
l_age_grp_2007_percent=[]
for i in l_age_grp_2007:
    yz=i/s7_1
    avg_2007_age_grp=yz*100
    l_age_grp_2007_percent.append(avg_2007_age_grp)
l_age_grp_2007_percent
Out[1447]:
[1.2085745181604224,
 21.117760173799866,
 20.465032073708368,
 12.509643315571692,
 4.694684066225316,
 40.00430585253434]
In [1448]:
np.max(l_age_grp_2007_percent)  #0-100+
Out[1448]:
40.00430585253434
In [1449]:
np.min(l_age_grp_2007_percent)  #0-14
Out[1449]:
1.2085745181604224
In [1450]:
total_male_percent_2007= (s7_2/s7_1)*100
total_male_percent_2007
Out[1450]:
64.66199873107831
In [1451]:
total_female_percent_2007= (s7_3/s7_1)*100
total_female_percent_2007
Out[1451]:
35.338001268921694
In [ ]:
 

2008

In [1452]:
df_2008 = suicide_df.loc[(suicide_df["Year"]==2008)]

df_2008
Out[1452]:
State Year Type Gender Age_group Total
2498 A & N ISLANDS 2008 Causes Not known Female 0-14 0
2499 A & N ISLANDS 2008 Dowry Dispute Male 45-59 0
2500 A & N ISLANDS 2008 Illegitimate Pregnancy Male 15-29 0
2501 A & N ISLANDS 2008 Professional/Career Problem Male 0-14 0
2502 A & N ISLANDS 2008 Suspected/Illicit Relation Female 60+ 0
... ... ... ... ... ... ...
236511 WEST BENGAL 2008 By Self Infliction of injury Male 60+ 0
236512 WEST BENGAL 2008 Farming/Agriculture Activity Female 30-44 50
236513 WEST BENGAL 2008 Others Female 60+ 30
236514 WEST BENGAL 2008 Others Male 0-14 89
236515 WEST BENGAL 2008 Retired Person Female 45-59 0

19719 rows × 6 columns

In [1453]:
t2008_dcount = df_2008.loc[:,"Total"]

s8_1 = np.sum(t2008_dcount)

s8_1
Out[1453]:
625014
In [1454]:
male_2008 = df_2008.loc[(df_2008["Gender"]=="Male")]

male_2008
Out[1454]:
State Year Type Gender Age_group Total
2499 A & N ISLANDS 2008 Dowry Dispute Male 45-59 0
2500 A & N ISLANDS 2008 Illegitimate Pregnancy Male 15-29 0
2501 A & N ISLANDS 2008 Professional/Career Problem Male 0-14 0
2503 A & N ISLANDS 2008 Middle Male 0-100+ 28
2504 A & N ISLANDS 2008 By Consuming Insecticides Male 15-29 0
... ... ... ... ... ... ...
236506 WEST BENGAL 2008 Insanity/Mental Illness Male 15-29 132
236507 WEST BENGAL 2008 Others Male 15-29 546
236509 WEST BENGAL 2008 By Jumping from (Building) Male 30-44 35
236511 WEST BENGAL 2008 By Self Infliction of injury Male 60+ 0
236514 WEST BENGAL 2008 Others Male 0-14 89

9867 rows × 6 columns

In [1455]:
m2008_count = male_2008.loc[:,"Total"]
s8_2 = np.sum(m2008_count)

s8_2
Out[1455]:
402704
In [1456]:
female_2008 = df_2008.loc[(df_2008["Gender"]=="Female")]

female_2008
Out[1456]:
State Year Type Gender Age_group Total
2498 A & N ISLANDS 2008 Causes Not known Female 0-14 0
2502 A & N ISLANDS 2008 Suspected/Illicit Relation Female 60+ 0
2505 A & N ISLANDS 2008 By Jumping from (Other sites) Female 15-29 0
2506 A & N ISLANDS 2008 Others Female 15-29 5
2508 A & N ISLANDS 2008 Professional Activity Female 0-14 0
... ... ... ... ... ... ...
236508 WEST BENGAL 2008 Other Prolonged Illness Female 15-29 36
236510 WEST BENGAL 2008 By Jumping from (Other sites) Female 60+ 0
236512 WEST BENGAL 2008 Farming/Agriculture Activity Female 30-44 50
236513 WEST BENGAL 2008 Others Female 60+ 30
236515 WEST BENGAL 2008 Retired Person Female 45-59 0

9852 rows × 6 columns

In [1457]:
fm2008_count = female_2008.loc[:,"Total"]
s8_3 = np.sum(fm2008_count)
s8_3
Out[1457]:
222310
In [1458]:
df_age_d014_2008 = df_2008.loc[(df_2008["Age_group"]=="0-14")]

df_age_d014_2008
Out[1458]:
State Year Type Gender Age_group Total
2498 A & N ISLANDS 2008 Causes Not known Female 0-14 0
2501 A & N ISLANDS 2008 Professional/Career Problem Male 0-14 0
2508 A & N ISLANDS 2008 Professional Activity Female 0-14 0
2605 A & N ISLANDS 2008 Bankruptcy or Sudden change in Economic Male 0-14 0
2610 A & N ISLANDS 2008 Insanity/Mental Illness Female 0-14 0
... ... ... ... ... ... ...
236282 UTTARAKHAND 2008 Service (Private) Female 0-14 0
236501 WEST BENGAL 2008 Bankruptcy or Sudden change in Economic Male 0-14 0
236502 WEST BENGAL 2008 Death of Dear Person Female 0-14 5
236503 WEST BENGAL 2008 Illegitimate Pregnancy Male 0-14 0
236514 WEST BENGAL 2008 Others Male 0-14 89

3752 rows × 6 columns

In [1459]:
t_014_2008 = df_age_d014_2008.loc[:,"Total"]

s8_4 = np.sum(t_014_2008)
s8_4
Out[1459]:
7143
In [1460]:
df_age_d1529_2008 = df_2008.loc[(df_2008["Age_group"]=="15-29")]

df_age_d1529_2008
Out[1460]:
State Year Type Gender Age_group Total
2500 A & N ISLANDS 2008 Illegitimate Pregnancy Male 15-29 0
2504 A & N ISLANDS 2008 By Consuming Insecticides Male 15-29 0
2505 A & N ISLANDS 2008 By Jumping from (Other sites) Female 15-29 0
2506 A & N ISLANDS 2008 Others Female 15-29 5
2607 A & N ISLANDS 2008 Fall in Social Reputation Female 15-29 0
... ... ... ... ... ... ...
236279 UTTARAKHAND 2008 By Drowning Female 15-29 2
236504 WEST BENGAL 2008 Illness (Aids/STD) Male 15-29 0
236506 WEST BENGAL 2008 Insanity/Mental Illness Male 15-29 132
236507 WEST BENGAL 2008 Others Male 15-29 546
236508 WEST BENGAL 2008 Other Prolonged Illness Female 15-29 36

3772 rows × 6 columns

In [1461]:
t_1529_2008 = df_age_d1529_2008.loc[:,"Total"]

s8_5 = np.sum(t_1529_2008)

s8_5
c:\program files\python\python38-32\lib\site-packages\IPython\core\displayhook.py:275: UserWarning: Output cache limit (currently 1000 entries) hit.
Flushing oldest 200 entries.
  warn('Output cache limit (currently {sz} entries) hit.\n'
Out[1461]:
133955
In [1462]:
df_age_d3044_2008 = df_2008.loc[(df_2008["Age_group"]=="30-44")]

df_age_d3044_2008
Out[1462]:
State Year Type Gender Age_group Total
2507 A & N ISLANDS 2008 Others Male 30-44 3
2694 A & N ISLANDS 2008 By Consuming Insecticides Female 30-44 0
2701 A & N ISLANDS 2008 Service (Government) Male 30-44 2
2720 A & N ISLANDS 2008 Illness (Aids/STD) Female 30-44 0
2722 A & N ISLANDS 2008 Paralysis Male 30-44 0
... ... ... ... ... ... ...
236062 UTTAR PRADESH 2008 Self-employed (Business activity) Female 30-44 10
236270 UTTARAKHAND 2008 Causes Not known Female 30-44 6
236274 UTTARAKHAND 2008 Illegitimate Pregnancy Male 30-44 0
236509 WEST BENGAL 2008 By Jumping from (Building) Male 30-44 35
236512 WEST BENGAL 2008 Farming/Agriculture Activity Female 30-44 50

3768 rows × 6 columns

In [1463]:
t_3044_2008 = df_age_d3044_2008.loc[:,"Total"]

s8_6 = np.sum(t_3044_2008)
s8_6
Out[1463]:
130676
In [1464]:
df_age_d4559_2008 = df_2008.loc[(df_2008["Age_group"]=="45-59")]

df_age_d4559_2008
Out[1464]:
State Year Type Gender Age_group Total
2499 A & N ISLANDS 2008 Dowry Dispute Male 45-59 0
2609 A & N ISLANDS 2008 Illness (Aids/STD) Male 45-59 0
2611 A & N ISLANDS 2008 By Consuming Insecticides Male 45-59 0
2616 A & N ISLANDS 2008 By touching electric wires Female 45-59 0
2695 A & N ISLANDS 2008 By Drowning Male 45-59 0
... ... ... ... ... ... ...
236275 UTTARAKHAND 2008 Professional/Career Problem Female 45-59 0
236276 UTTARAKHAND 2008 Unemployment Male 45-59 0
236278 UTTARAKHAND 2008 By Consuming Other Poison Female 45-59 3
236281 UTTARAKHAND 2008 By Jumping from (Building) Female 45-59 0
236515 WEST BENGAL 2008 Retired Person Female 45-59 0

3764 rows × 6 columns

In [1465]:
t_4559_2008 = df_age_d4559_2008.loc[:,"Total"]

s8_7 = np.sum(t_4559_2008)

s8_7
Out[1465]:
75574
In [1466]:
df_age_d60_2008 = df_2008.loc[(df_2008["Age_group"]=="60+")]

df_age_d60_2008
Out[1466]:
State Year Type Gender Age_group Total
2502 A & N ISLANDS 2008 Suspected/Illicit Relation Female 60+ 0
2509 A & N ISLANDS 2008 Service (Private) Female 60+ 0
2606 A & N ISLANDS 2008 Cancellation/Non-Settlement of Marriage Male 60+ 0
2608 A & N ISLANDS 2008 Illness (Aids/STD) Female 60+ 0
2612 A & N ISLANDS 2008 By Consuming Other Poison Female 60+ 1
... ... ... ... ... ... ...
236280 UTTARAKHAND 2008 By Fire/Self Immolation Female 60+ 0
236505 WEST BENGAL 2008 Illness (Aids/STD) Male 60+ 0
236510 WEST BENGAL 2008 By Jumping from (Other sites) Female 60+ 0
236511 WEST BENGAL 2008 By Self Infliction of injury Male 60+ 0
236513 WEST BENGAL 2008 Others Female 60+ 30

3753 rows × 6 columns

In [1467]:
t_60_2008 = df_age_d60_2008.loc[:,"Total"]

s8_8 = np.sum(t_60_2008)
s8_8
Out[1467]:
27632
In [1468]:
df_age_d0100_2008 = df_2008.loc[(df_2008["Age_group"]=="0-100+")]

df_age_d0100_2008
Out[1468]:
State Year Type Gender Age_group Total
2503 A & N ISLANDS 2008 Middle Male 0-100+ 28
2726 A & N ISLANDS 2008 Matriculate/Secondary Female 0-100+ 13
2736 A & N ISLANDS 2008 Seperated Male 0-100+ 0
2990 A & N ISLANDS 2008 Post Graduate and Above Male 0-100+ 0
2996 A & N ISLANDS 2008 Never Married Female 0-100+ 12
... ... ... ... ... ... ...
235658 TAMIL NADU 2008 Never Married Male 0-100+ 1442
235865 TRIPURA 2008 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 28
235875 TRIPURA 2008 Never Married Female 0-100+ 60
236050 UTTAR PRADESH 2008 Hr. Secondary/Intermediate/Pre-Universit Female 0-100+ 193
236277 UTTARAKHAND 2008 Post Graduate and Above Male 0-100+ 1

910 rows × 6 columns

In [1469]:
t_0100_2008 = df_age_d0100_2008.loc[:,"Total"]

s8_54 = np.sum(t_0100_2008)
s8_54
Out[1469]:
250034
In [1470]:
df_014m_2008 = df_age_d014_2008.loc[(df_age_d014_2008["Gender"]=="Male")]
df_014m_2008
Out[1470]:
State Year Type Gender Age_group Total
2501 A & N ISLANDS 2008 Professional/Career Problem Male 0-14 0
2605 A & N ISLANDS 2008 Bankruptcy or Sudden change in Economic Male 0-14 0
2614 A & N ISLANDS 2008 By Machine Male 0-14 0
2689 A & N ISLANDS 2008 Death of Dear Person Male 0-14 0
2690 A & N ISLANDS 2008 Drug Abuse/Addiction Male 0-14 0
... ... ... ... ... ... ...
236053 UTTAR PRADESH 2008 By Hanging Male 0-14 6
236061 UTTAR PRADESH 2008 Public Sector Undertaking Male 0-14 0
236501 WEST BENGAL 2008 Bankruptcy or Sudden change in Economic Male 0-14 0
236503 WEST BENGAL 2008 Illegitimate Pregnancy Male 0-14 0
236514 WEST BENGAL 2008 Others Male 0-14 89

1876 rows × 6 columns

In [1471]:
t_014m_2008 = df_014m_2008.loc[:,"Total"]

s8_9 = np.sum(t_014m_2008)
s8_9
Out[1471]:
3495
In [1472]:
df_014fm_2008 = df_age_d014_2008.loc[(df_age_d014_2008["Gender"]=="Female")]
df_014fm_2008
Out[1472]:
State Year Type Gender Age_group Total
2498 A & N ISLANDS 2008 Causes Not known Female 0-14 0
2508 A & N ISLANDS 2008 Professional Activity Female 0-14 0
2610 A & N ISLANDS 2008 Insanity/Mental Illness Female 0-14 0
2699 A & N ISLANDS 2008 Public Sector Undertaking Female 0-14 0
2729 A & N ISLANDS 2008 By Jumping from (Other sites) Female 0-14 0
... ... ... ... ... ... ...
235871 TRIPURA 2008 Student Female 0-14 13
236042 UTTAR PRADESH 2008 Dowry Dispute Female 0-14 6
236046 UTTAR PRADESH 2008 Ideological Causes/Hero Worshipping Female 0-14 0
236282 UTTARAKHAND 2008 Service (Private) Female 0-14 0
236502 WEST BENGAL 2008 Death of Dear Person Female 0-14 5

1876 rows × 6 columns

In [1473]:
t_014fm_2008 = df_014fm_2008.loc[:,"Total"]

s8_10 = np.sum(t_014fm_2008)
s8_10
Out[1473]:
3648
In [1474]:
df_1529m_2008 = df_age_d1529_2008.loc[(df_age_d1529_2008["Gender"]=="Male")]
df_1529m_2008
Out[1474]:
State Year Type Gender Age_group Total
2500 A & N ISLANDS 2008 Illegitimate Pregnancy Male 15-29 0
2504 A & N ISLANDS 2008 By Consuming Insecticides Male 15-29 0
2691 A & N ISLANDS 2008 Family Problems Male 15-29 0
2721 A & N ISLANDS 2008 Insanity/Mental Illness Male 15-29 3
2731 A & N ISLANDS 2008 Others Male 15-29 0
... ... ... ... ... ... ...
236271 UTTARAKHAND 2008 Dowry Dispute Male 15-29 0
236272 UTTARAKHAND 2008 Ideological Causes/Hero Worshipping Male 15-29 0
236504 WEST BENGAL 2008 Illness (Aids/STD) Male 15-29 0
236506 WEST BENGAL 2008 Insanity/Mental Illness Male 15-29 132
236507 WEST BENGAL 2008 Others Male 15-29 546

1888 rows × 6 columns

In [1475]:
t_1529m_2008 = df_1529m_2008.loc[:,"Total"]

s8_11 = np.sum(t_1529m_2008)
s8_11
Out[1475]:
73188
In [1476]:
df_1529fm_2008 = df_age_d1529_2008.loc[(df_age_d1529_2008["Gender"]=="Female")]
df_1529fm_2008
Out[1476]:
State Year Type Gender Age_group Total
2505 A & N ISLANDS 2008 By Jumping from (Other sites) Female 15-29 0
2506 A & N ISLANDS 2008 Others Female 15-29 5
2607 A & N ISLANDS 2008 Fall in Social Reputation Female 15-29 0
2615 A & N ISLANDS 2008 By Self Infliction of injury Female 15-29 0
2617 A & N ISLANDS 2008 Professional Activity Female 15-29 0
... ... ... ... ... ... ...
236051 UTTAR PRADESH 2008 By Consuming Insecticides Female 15-29 172
236056 UTTAR PRADESH 2008 By Overdose of sleeping pills Female 15-29 19
236059 UTTAR PRADESH 2008 House Wife Female 15-29 618
236279 UTTARAKHAND 2008 By Drowning Female 15-29 2
236508 WEST BENGAL 2008 Other Prolonged Illness Female 15-29 36

1884 rows × 6 columns

In [1477]:
t_1529fm_2008 = df_1529fm_2008.loc[:,"Total"]

s8_12 = np.sum(t_1529fm_2008)
s8_12
Out[1477]:
60767
In [1478]:
df_3044m_2008 = df_age_d3044_2008.loc[(df_age_d3044_2008["Gender"]=="Male")]
df_3044m_2008
Out[1478]:
State Year Type Gender Age_group Total
2507 A & N ISLANDS 2008 Others Male 30-44 3
2701 A & N ISLANDS 2008 Service (Government) Male 30-44 2
2722 A & N ISLANDS 2008 Paralysis Male 30-44 0
2725 A & N ISLANDS 2008 Property Dispute Male 30-44 0
2728 A & N ISLANDS 2008 By Fire/Self Immolation Male 30-44 1
... ... ... ... ... ... ...
236043 UTTAR PRADESH 2008 Dowry Dispute Male 30-44 8
236047 UTTAR PRADESH 2008 Insanity/Mental Illness Male 30-44 56
236048 UTTAR PRADESH 2008 Poverty Male 30-44 9
236274 UTTARAKHAND 2008 Illegitimate Pregnancy Male 30-44 0
236509 WEST BENGAL 2008 By Jumping from (Building) Male 30-44 35

1885 rows × 6 columns

In [1479]:
t_3044m_2008 = df_3044m_2008.loc[:,"Total"]

s8_13 = np.sum(t_3044m_2008)
s8_13
Out[1479]:
88551
In [1480]:
df_3044fm_2008 = df_age_d3044_2008.loc[(df_age_d3044_2008["Gender"]=="Female")]
df_3044fm_2008
Out[1480]:
State Year Type Gender Age_group Total
2694 A & N ISLANDS 2008 By Consuming Insecticides Female 30-44 0
2720 A & N ISLANDS 2008 Illness (Aids/STD) Female 30-44 0
2724 A & N ISLANDS 2008 Poverty Female 30-44 0
2730 A & N ISLANDS 2008 Others Female 30-44 0
2735 A & N ISLANDS 2008 Unemployed Female 30-44 0
... ... ... ... ... ... ...
235872 TRIPURA 2008 Student Female 30-44 0
236060 UTTAR PRADESH 2008 Professional Activity Female 30-44 1
236062 UTTAR PRADESH 2008 Self-employed (Business activity) Female 30-44 10
236270 UTTARAKHAND 2008 Causes Not known Female 30-44 6
236512 WEST BENGAL 2008 Farming/Agriculture Activity Female 30-44 50

1883 rows × 6 columns

In [1481]:
t_3044fm_2008 = df_3044fm_2008.loc[:,"Total"]

s8_14 = np.sum(t_3044fm_2008)
s8_14
Out[1481]:
42125
In [1482]:
df_4559m_2008 = df_age_d4559_2008.loc[(df_age_d4559_2008["Gender"]=="Male")]
df_4559m_2008
Out[1482]:
State Year Type Gender Age_group Total
2499 A & N ISLANDS 2008 Dowry Dispute Male 45-59 0
2609 A & N ISLANDS 2008 Illness (Aids/STD) Male 45-59 0
2611 A & N ISLANDS 2008 By Consuming Insecticides Male 45-59 0
2695 A & N ISLANDS 2008 By Drowning Male 45-59 0
2698 A & N ISLANDS 2008 Others Male 45-59 1
... ... ... ... ... ... ...
236045 UTTAR PRADESH 2008 Drug Abuse/Addiction Male 45-59 27
236049 UTTAR PRADESH 2008 Poverty Male 45-59 10
236054 UTTAR PRADESH 2008 By Machine Male 45-59 2
236058 UTTAR PRADESH 2008 Farming/Agriculture Activity Male 45-59 156
236276 UTTARAKHAND 2008 Unemployment Male 45-59 0

1885 rows × 6 columns

In [1483]:
t_4559m_2008 = df_4559m_2008.loc[:,"Total"]

s8_15 = np.sum(t_4559m_2008)
s8_15
Out[1483]:
56457
In [1484]:
df_4559fm_2008 = df_age_d4559_2008.loc[(df_age_d4559_2008["Gender"]=="Female")]
df_4559fm_2008
Out[1484]:
State Year Type Gender Age_group Total
2616 A & N ISLANDS 2008 By touching electric wires Female 45-59 0
2697 A & N ISLANDS 2008 Farming/Agriculture Activity Female 45-59 0
2727 A & N ISLANDS 2008 By Drowning Female 45-59 0
2828 A & N ISLANDS 2008 By Over Alcoholism Female 45-59 0
2946 A & N ISLANDS 2008 Fall in Social Reputation Female 45-59 0
... ... ... ... ... ... ...
236052 UTTAR PRADESH 2008 By Hanging Female 45-59 33
236275 UTTARAKHAND 2008 Professional/Career Problem Female 45-59 0
236278 UTTARAKHAND 2008 By Consuming Other Poison Female 45-59 3
236281 UTTARAKHAND 2008 By Jumping from (Building) Female 45-59 0
236515 WEST BENGAL 2008 Retired Person Female 45-59 0

1879 rows × 6 columns

In [1485]:
t_4559fm_2008 = df_4559fm_2008.loc[:,"Total"]

s8_16 = np.sum(t_4559fm_2008)
s8_16
Out[1485]:
19117
In [1486]:
df_60m_2008 = df_age_d60_2008.loc[(df_age_d60_2008["Gender"]=="Male")]
df_60m_2008
Out[1486]:
State Year Type Gender Age_group Total
2606 A & N ISLANDS 2008 Cancellation/Non-Settlement of Marriage Male 60+ 0
2618 A & N ISLANDS 2008 Retired Person Male 60+ 3
2818 A & N ISLANDS 2008 Drug Abuse/Addiction Male 60+ 0
2820 A & N ISLANDS 2008 Not having Children(Barrenness/Impotency Male 60+ 0
2822 A & N ISLANDS 2008 Other Prolonged Illness Male 60+ 6
... ... ... ... ... ... ...
236057 UTTAR PRADESH 2008 By touching electric wires Male 60+ 8
236269 UTTARAKHAND 2008 Bankruptcy or Sudden change in Economic Male 60+ 0
236273 UTTARAKHAND 2008 Ideological Causes/Hero Worshipping Male 60+ 0
236505 WEST BENGAL 2008 Illness (Aids/STD) Male 60+ 0
236511 WEST BENGAL 2008 By Self Infliction of injury Male 60+ 0

1878 rows × 6 columns

In [1487]:
t_60m_2008 = df_60m_2008.loc[:,"Total"]

s8_17 = np.sum(t_60m_2008)
s8_17
Out[1487]:
19925
In [1488]:
df_60fm_2008 = df_age_d60_2008.loc[(df_age_d60_2008["Gender"]=="Female")]
df_60fm_2008
Out[1488]:
State Year Type Gender Age_group Total
2502 A & N ISLANDS 2008 Suspected/Illicit Relation Female 60+ 0
2509 A & N ISLANDS 2008 Service (Private) Female 60+ 0
2608 A & N ISLANDS 2008 Illness (Aids/STD) Female 60+ 0
2612 A & N ISLANDS 2008 By Consuming Other Poison Female 60+ 1
2613 A & N ISLANDS 2008 By Drowning Female 60+ 0
... ... ... ... ... ... ...
235862 TRIPURA 2008 Others Female 60+ 0
235873 TRIPURA 2008 Student Female 60+ 0
236280 UTTARAKHAND 2008 By Fire/Self Immolation Female 60+ 0
236510 WEST BENGAL 2008 By Jumping from (Other sites) Female 60+ 0
236513 WEST BENGAL 2008 Others Female 60+ 30

1875 rows × 6 columns

In [1489]:
t_60fm_2008 = df_60fm_2008.loc[:,"Total"]

s8_18 = np.sum(t_60fm_2008)
s8_18
Out[1489]:
7707
In [1490]:
df_0100fm_2008 = df_age_d0100_2008.loc[(df_age_d0100_2008["Gender"]=="Female")]
df_0100fm_2008
Out[1490]:
State Year Type Gender Age_group Total
2726 A & N ISLANDS 2008 Matriculate/Secondary Female 0-100+ 13
2996 A & N ISLANDS 2008 Never Married Female 0-100+ 12
3108 A & N ISLANDS 2008 Post Graduate and Above Female 0-100+ 1
3751 A & N ISLANDS 2008 Hr. Secondary/Intermediate/Pre-Universit Female 0-100+ 9
4215 A & N ISLANDS 2008 Diploma Female 0-100+ 0
... ... ... ... ... ... ...
234812 PUDUCHERRY 2008 Married Female 0-100+ 107
235190 RAJASTHAN 2008 Primary Female 0-100+ 303
235657 TAMIL NADU 2008 Never Married Female 0-100+ 914
235875 TRIPURA 2008 Never Married Female 0-100+ 60
236050 UTTAR PRADESH 2008 Hr. Secondary/Intermediate/Pre-Universit Female 0-100+ 193

455 rows × 6 columns

In [1491]:
t_0100fm_2008 = df_0100fm_2008.loc[:,"Total"]

s8_55 = np.sum(t_0100fm_2008)
s8_55
Out[1491]:
88946
In [1492]:
df_0100m_2008 = df_age_d0100_2008.loc[(df_age_d0100_2008["Gender"]=="Male")]
df_0100m_2008
Out[1492]:
State Year Type Gender Age_group Total
2503 A & N ISLANDS 2008 Middle Male 0-100+ 28
2736 A & N ISLANDS 2008 Seperated Male 0-100+ 0
2990 A & N ISLANDS 2008 Post Graduate and Above Male 0-100+ 0
3109 A & N ISLANDS 2008 Primary Male 0-100+ 6
3332 A & N ISLANDS 2008 Widowed/Widower Male 0-100+ 0
... ... ... ... ... ... ...
234178 MIZORAM 2008 Post Graduate and Above Male 0-100+ 0
235189 RAJASTHAN 2008 Middle Male 0-100+ 669
235658 TAMIL NADU 2008 Never Married Male 0-100+ 1442
235865 TRIPURA 2008 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 28
236277 UTTARAKHAND 2008 Post Graduate and Above Male 0-100+ 1

455 rows × 6 columns

In [1493]:
t_0100m_2008 = df_0100m_2008.loc[:,"Total"]

s8_56 = np.sum(t_0100m_2008)
s8_56
Out[1493]:
161088
In [1494]:
df_st_AN_2008 = df_2008.loc[(df_2008["State"]=="A & N ISLANDS")]

df_st_AN_2008
Out[1494]:
State Year Type Gender Age_group Total
2498 A & N ISLANDS 2008 Causes Not known Female 0-14 0
2499 A & N ISLANDS 2008 Dowry Dispute Male 45-59 0
2500 A & N ISLANDS 2008 Illegitimate Pregnancy Male 15-29 0
2501 A & N ISLANDS 2008 Professional/Career Problem Male 0-14 0
2502 A & N ISLANDS 2008 Suspected/Illicit Relation Female 60+ 0
... ... ... ... ... ... ...
8001 A & N ISLANDS 2008 By Consuming Insecticides Male 30-44 0
8002 A & N ISLANDS 2008 By Consuming Other Poison Male 15-29 4
8003 A & N ISLANDS 2008 By Self Infliction of injury Male 30-44 0
8004 A & N ISLANDS 2008 Farming/Agriculture Activity Male 45-59 6
8005 A & N ISLANDS 2008 Widowed/Widower Female 0-100+ 0

560 rows × 6 columns

In [1495]:
t_AN_2008 = df_st_AN_2008.loc[:,"Total"]

s8_19 = np.sum(t_AN_2008)
s8_19
Out[1495]:
714
In [1496]:
df_st_AP_2008 = df_2008.loc[(df_2008["State"]=="ANDHRA PRADESH")]

df_st_AP_2008
Out[1496]:
State Year Type Gender Age_group Total
7536 ANDHRA PRADESH 2008 Bankruptcy or Sudden change in Economic Female 15-29 20
7537 ANDHRA PRADESH 2008 Cancellation/Non-Settlement of Marriage Female 30-44 2
7538 ANDHRA PRADESH 2008 Drug Abuse/Addiction Male 45-59 13
7539 ANDHRA PRADESH 2008 Love Affairs Female 15-29 93
7540 ANDHRA PRADESH 2008 Others Male 30-44 816
... ... ... ... ... ... ...
229459 ANDHRA PRADESH 2008 Professional Activity Female 45-59 0
229460 ANDHRA PRADESH 2008 Public Sector Undertaking Female 30-44 33
229461 ANDHRA PRADESH 2008 Self-employed (Business activity) Female 30-44 17
229462 ANDHRA PRADESH 2008 Service (Private) Male 15-29 239
229463 ANDHRA PRADESH 2008 Service (Private) Male 60+ 92

565 rows × 6 columns

In [1497]:
t_AP_2008 = df_st_AP_2008.loc[:,"Total"]

s8_20 = np.sum(t_AP_2008)
s8_20
Out[1497]:
71729
In [1498]:
df_st_ARP_2008 = df_2008.loc[(df_2008["State"]=="ARUNACHAL PRADESH")]

df_st_ARP_2008
Out[1498]:
State Year Type Gender Age_group Total
12336 ARUNACHAL PRADESH 2008 Causes Not known Male 45-59 5
12337 ARUNACHAL PRADESH 2008 Illness (Aids/STD) Male 0-14 0
12338 ARUNACHAL PRADESH 2008 Paralysis Female 45-59 0
12339 ARUNACHAL PRADESH 2008 Professional/Career Problem Female 15-29 0
12340 ARUNACHAL PRADESH 2008 Property Dispute Female 15-29 0
... ... ... ... ... ... ...
229676 ARUNACHAL PRADESH 2008 Others Male 60+ 0
229677 ARUNACHAL PRADESH 2008 Retired Person Male 60+ 0
229678 ARUNACHAL PRADESH 2008 Student Male 0-14 1
229679 ARUNACHAL PRADESH 2008 Unemployed Male 15-29 4
229680 ARUNACHAL PRADESH 2008 Never Married Female 0-100+ 8

560 rows × 6 columns

In [1499]:
t_ARP_2008 = df_st_ARP_2008.loc[:,"Total"]

s8_21 = np.sum(t_ARP_2008)
s8_21
Out[1499]:
549
In [1500]:
df_st_AS_2008 = df_2008.loc[(df_2008["State"]=="ASSAM")]

df_st_AS_2008
Out[1500]:
State Year Type Gender Age_group Total
19392 ASSAM 2008 Causes Not known Female 30-44 79
19393 ASSAM 2008 Causes Not known Male 60+ 21
19394 ASSAM 2008 Divorce Female 30-44 0
19395 ASSAM 2008 Dowry Dispute Female 45-59 0
19396 ASSAM 2008 Insanity/Mental Illness Male 15-29 5
... ... ... ... ... ... ...
229848 ASSAM 2008 Insanity/Mental Illness Female 0-14 0
229849 ASSAM 2008 Insanity/Mental Illness Male 30-44 8
229850 ASSAM 2008 Unemployment Female 60+ 0
229851 ASSAM 2008 Professional Activity Female 0-14 0
229852 ASSAM 2008 Self-employed (Business activity) Female 0-14 0

566 rows × 6 columns

In [1501]:
t_AS_2008 = df_st_AS_2008.loc[:,"Total"]

s8_22 = np.sum(t_AS_2008)
s8_22
Out[1501]:
14945
In [1502]:
df_st_BH_2008 = df_2008.loc[(df_2008["State"]=="BIHAR")]

df_st_BH_2008
Out[1502]:
State Year Type Gender Age_group Total
24656 BIHAR 2008 Causes Not known Female 15-29 29
24657 BIHAR 2008 Divorce Male 15-29 0
24658 BIHAR 2008 Ideological Causes/Hero Worshipping Female 15-29 0
24659 BIHAR 2008 Ideological Causes/Hero Worshipping Female 60+ 0
24660 BIHAR 2008 Illness (Aids/STD) Female 45-59 0
... ... ... ... ... ... ...
230103 BIHAR 2008 Others Male 0-14 2
230104 BIHAR 2008 Service (Government) Female 0-14 0
230105 BIHAR 2008 Service (Government) Male 30-44 2
230106 BIHAR 2008 Divorcee Male 0-100+ 15
230107 BIHAR 2008 Never Married Female 0-100+ 107

566 rows × 6 columns

In [1503]:
t_BH_2008 = df_st_BH_2008.loc[:,"Total"]

s8_23 = np.sum(t_BH_2008)
s8_23
Out[1503]:
5075
In [1504]:
df_st_CH_2008 = df_2008.loc[(df_2008["State"]=="CHANDIGARH")]

df_st_CH_2008
Out[1504]:
State Year Type Gender Age_group Total
30545 CHANDIGARH 2008 Cancellation/Non-Settlement of Marriage Male 15-29 0
30546 CHANDIGARH 2008 Death of Dear Person Male 60+ 0
30547 CHANDIGARH 2008 Divorce Male 60+ 0
30548 CHANDIGARH 2008 Failure in Examination Female 45-59 0
30549 CHANDIGARH 2008 Family Problems Female 45-59 1
... ... ... ... ... ... ...
230318 CHANDIGARH 2008 Retired Person Male 30-44 0
230319 CHANDIGARH 2008 Retired Person Male 45-59 1
230320 CHANDIGARH 2008 Self-employed (Business activity) Male 15-29 2
230321 CHANDIGARH 2008 Service (Private) Male 0-14 0
230322 CHANDIGARH 2008 Seperated Female 0-100+ 0

556 rows × 6 columns

In [1505]:
t_CH_2008 = df_st_CH_2008.loc[:,"Total"]

s8_24 = np.sum(t_CH_2008)
s8_24
Out[1505]:
415
In [1506]:
df_st_CT_2008 = df_2008.loc[(df_2008["State"]=="CHHATTISGARH")]

df_st_CT_2008
Out[1506]:
State Year Type Gender Age_group Total
38182 CHHATTISGARH 2008 Death of Dear Person Female 15-29 8
38183 CHHATTISGARH 2008 Others Female 15-29 89
38184 CHHATTISGARH 2008 Paralysis Female 45-59 1
38185 CHHATTISGARH 2008 Professional/Career Problem Male 0-14 0
38186 CHHATTISGARH 2008 By coming under running vehicles/trains Male 0-14 2
... ... ... ... ... ... ...
230538 CHHATTISGARH 2008 Others Female 60+ 12
230539 CHHATTISGARH 2008 Retired Person Female 15-29 0
230540 CHHATTISGARH 2008 Retired Person Female 60+ 0
230541 CHHATTISGARH 2008 Student Male 45-59 1
230542 CHHATTISGARH 2008 Never Married Male 0-100+ 698

566 rows × 6 columns

In [1507]:
t_CT_2008 = df_st_CT_2008.loc[:,"Total"]

s8_25 = np.sum(t_CT_2008)
s8_25
Out[1507]:
24725
In [1508]:
df_st_DN_2008 = df_2008.loc[(df_2008["State"]=="D & N HAVELI")]

df_st_DN_2008
Out[1508]:
State Year Type Gender Age_group Total
44094 D & N HAVELI 2008 Cancer Female 15-29 0
44095 D & N HAVELI 2008 Cancer Female 30-44 0
45351 D & N HAVELI 2008 Cancellation/Non-Settlement of Marriage Male 30-44 0
45352 D & N HAVELI 2008 Divorce Male 45-59 0
45353 D & N HAVELI 2008 Dowry Dispute Female 30-44 0
... ... ... ... ... ... ...
230751 D & N HAVELI 2008 By Jumping from (Building) Male 60+ 0
230752 D & N HAVELI 2008 Others Female 60+ 0
230753 D & N HAVELI 2008 By touching electric wires Male 0-14 0
230754 D & N HAVELI 2008 Service (Private) Female 45-59 0
230755 D & N HAVELI 2008 Never Married Female 0-100+ 6

559 rows × 6 columns

In [1509]:
t_DN_2008 = df_st_DN_2008.loc[:,"Total"]

s8_26 = np.sum(t_DN_2008)
s8_26
Out[1509]:
300
In [1510]:
df_st_DD_2008 = df_2008.loc[(df_2008["State"]=="DAMAN & DIU")]

df_st_DD_2008
Out[1510]:
State Year Type Gender Age_group Total
50593 DAMAN & DIU 2008 Cancellation/Non-Settlement of Marriage Male 45-59 0
50594 DAMAN & DIU 2008 Divorce Male 30-44 0
50595 DAMAN & DIU 2008 Failure in Examination Female 15-29 0
50596 DAMAN & DIU 2008 Failure in Examination Male 0-14 0
50597 DAMAN & DIU 2008 Fall in Social Reputation Female 45-59 0
... ... ... ... ... ... ...
230939 DAMAN & DIU 2008 By Drowning Male 0-14 0
230940 DAMAN & DIU 2008 By Fire-Arms Male 15-29 0
230941 DAMAN & DIU 2008 By Jumping off Moving Vehicles/Trains Female 45-59 0
230942 DAMAN & DIU 2008 Public Sector Undertaking Male 0-14 0
230943 DAMAN & DIU 2008 Service (Private) Male 60+ 0

560 rows × 6 columns

In [1511]:
t_DD_2008 = df_st_DD_2008.loc[:,"Total"]

s8_27 = np.sum(t_DD_2008)
s8_27
Out[1511]:
95
In [1512]:
df_st_DL_2008 = df_2008.loc[(df_2008["State"]=="DELHI (UT)")]

df_st_DL_2008
Out[1512]:
State Year Type Gender Age_group Total
55830 DELHI (UT) 2008 Cancer Female 15-29 0
55831 DELHI (UT) 2008 Others Male 30-44 21
55832 DELHI (UT) 2008 Professional/Career Problem Female 15-29 2
55833 DELHI (UT) 2008 Property Dispute Female 15-29 0
55834 DELHI (UT) 2008 Property Dispute Female 60+ 0
... ... ... ... ... ... ...
231185 DELHI (UT) 2008 House Wife Female 45-59 19
231186 DELHI (UT) 2008 Others Male 30-44 51
231187 DELHI (UT) 2008 Retired Person Female 45-59 0
231188 DELHI (UT) 2008 Self-employed (Business activity) Male 15-29 7
231189 DELHI (UT) 2008 Unemployed Male 45-59 22

565 rows × 6 columns

In [1513]:
t_DL_2008 = df_st_DL_2008.loc[:,"Total"]

s8_28 = np.sum(t_DL_2008)
s8_28
Out[1513]:
6511
In [1514]:
df_st_GOA_2008 = df_2008.loc[(df_2008["State"]=="GOA")]

df_st_GOA_2008
Out[1514]:
State Year Type Gender Age_group Total
60667 GOA 2008 Dowry Dispute Male 0-14 0
60668 GOA 2008 Love Affairs Female 60+ 0
60669 GOA 2008 Poverty Female 30-44 0
60670 GOA 2008 Professional/Career Problem Female 60+ 0
60671 GOA 2008 By Consuming Insecticides Male 15-29 2
... ... ... ... ... ... ...
231420 GOA 2008 By Overdose of sleeping pills Male 60+ 1
231421 GOA 2008 House Wife Female 30-44 19
231422 GOA 2008 Retired Person Female 30-44 0
231423 GOA 2008 Service (Private) Female 0-14 0
231424 GOA 2008 Unemployed Male 30-44 22

561 rows × 6 columns

In [1515]:
t_GOA_2008 = df_st_GOA_2008.loc[:,"Total"]

s8_29 = np.sum(t_GOA_2008)
s8_29
Out[1515]:
1431
In [1516]:
df_st_GJ_2008 = df_2008.loc[(df_2008["State"]=="GUJARAT")]

df_st_GJ_2008
Out[1516]:
State Year Type Gender Age_group Total
67428 GUJARAT 2008 Divorce Female 30-44 7
67429 GUJARAT 2008 Fall in Social Reputation Male 0-14 0
67430 GUJARAT 2008 Love Affairs Female 30-44 19
67431 GUJARAT 2008 Not having Children(Barrenness/Impotency Female 15-29 14
67432 GUJARAT 2008 Other Prolonged Illness Female 45-59 74
... ... ... ... ... ... ...
231640 GUJARAT 2008 By Over Alcoholism Female 60+ 0
231641 GUJARAT 2008 By Overdose of sleeping pills Male 60+ 9
231642 GUJARAT 2008 By Self Infliction of injury Male 15-29 6
231643 GUJARAT 2008 Others Female 45-59 9
231644 GUJARAT 2008 Professional Activity Male 60+ 19

565 rows × 6 columns

In [1517]:
t_GJ_2008 = df_st_GJ_2008.loc[:,"Total"]

s8_30 = np.sum(t_GJ_2008)
s8_30
Out[1517]:
30818
In [1518]:
df_st_HR_2008 = df_2008.loc[(df_2008["State"]=="HARYANA")]

df_st_HR_2008
Out[1518]:
State Year Type Gender Age_group Total
73828 HARYANA 2008 Dowry Dispute Female 30-44 4
73829 HARYANA 2008 Drug Abuse/Addiction Male 60+ 0
73830 HARYANA 2008 Failure in Examination Female 30-44 2
73831 HARYANA 2008 Illness (Aids/STD) Male 45-59 0
73832 HARYANA 2008 Other Prolonged Illness Male 0-14 6
... ... ... ... ... ... ...
231817 HARYANA 2008 By Fire-Arms Female 15-29 1
231818 HARYANA 2008 Others Male 0-14 27
231819 HARYANA 2008 By touching electric wires Female 45-59 1
231820 HARYANA 2008 By touching electric wires Female 60+ 0
231821 HARYANA 2008 Student Female 45-59 0

566 rows × 6 columns

In [1519]:
t_HR_2008 = df_st_HR_2008.loc[:,"Total"]

s8_31 = np.sum(t_HR_2008)
s8_31
Out[1519]:
13280
In [1520]:
df_st_HP_2008 = df_2008.loc[(df_2008["State"]=="HIMACHAL PRADESH")]

df_st_HP_2008
Out[1520]:
State Year Type Gender Age_group Total
81216 HIMACHAL PRADESH 2008 Bankruptcy or Sudden change in Economic Female 30-44 0
81217 HIMACHAL PRADESH 2008 Cancellation/Non-Settlement of Marriage Female 60+ 0
81218 HIMACHAL PRADESH 2008 Dowry Dispute Female 60+ 0
81219 HIMACHAL PRADESH 2008 Family Problems Male 15-29 19
81220 HIMACHAL PRADESH 2008 Ideological Causes/Hero Worshipping Female 60+ 0
... ... ... ... ... ... ...
232070 HIMACHAL PRADESH 2008 Others Female 15-29 10
232071 HIMACHAL PRADESH 2008 Others Female 15-29 13
232072 HIMACHAL PRADESH 2008 Professional Activity Male 0-14 0
232073 HIMACHAL PRADESH 2008 Service (Government) Male 0-14 0
232074 HIMACHAL PRADESH 2008 Unemployed Male 45-59 2

563 rows × 6 columns

In [1521]:
t_HP_2008 = df_st_HP_2008.loc[:,"Total"]

s8_32 = np.sum(t_HP_2008)
s8_32
Out[1521]:
3148
In [1522]:
df_st_JK_2008 = df_2008.loc[(df_2008["State"]=="JAMMU & KASHMIR")]

df_st_JK_2008
Out[1522]:
State Year Type Gender Age_group Total
87004 JAMMU & KASHMIR 2008 Bankruptcy or Sudden change in Economic Male 15-29 3
87005 JAMMU & KASHMIR 2008 Cancellation/Non-Settlement of Marriage Male 15-29 0
87006 JAMMU & KASHMIR 2008 Divorce Female 60+ 0
87007 JAMMU & KASHMIR 2008 Dowry Dispute Male 30-44 0
87008 JAMMU & KASHMIR 2008 Failure in Examination Female 0-14 0
... ... ... ... ... ... ...
232292 JAMMU & KASHMIR 2008 Unemployment Female 45-59 0
232293 JAMMU & KASHMIR 2008 By Jumping from (Building) Male 15-29 0
232294 JAMMU & KASHMIR 2008 By Jumping from (Building) Male 60+ 0
232295 JAMMU & KASHMIR 2008 Others Female 60+ 0
232296 JAMMU & KASHMIR 2008 Service (Private) Female 45-59 0

562 rows × 6 columns

In [1523]:
t_JK_2008 = df_st_JK_2008.loc[:,"Total"]

s8_33 = np.sum(t_JK_2008)
s8_33
Out[1523]:
1547
In [1524]:
df_st_JH_2008 = df_2008.loc[(df_2008["State"]=="JHARKHAND")]

df_st_JH_2008
Out[1524]:
State Year Type Gender Age_group Total
91811 JHARKHAND 2008 Death of Dear Person Female 60+ 0
91812 JHARKHAND 2008 Divorce Male 30-44 6
93057 JHARKHAND 2008 Failure in Examination Female 60+ 0
93058 JHARKHAND 2008 Fall in Social Reputation Male 30-44 1
93059 JHARKHAND 2008 Love Affairs Female 60+ 0
... ... ... ... ... ... ...
232527 JHARKHAND 2008 By touching electric wires Female 60+ 1
232528 JHARKHAND 2008 By touching electric wires Male 30-44 13
232529 JHARKHAND 2008 Farming/Agriculture Activity Male 0-14 3
232530 JHARKHAND 2008 Student Female 0-14 13
232531 JHARKHAND 2008 Unemployed Female 0-14 1

566 rows × 6 columns

In [1525]:
t_JH_2008 = df_st_JH_2008.loc[:,"Total"]

s8_34 = np.sum(t_JH_2008)
s8_34
Out[1525]:
4555
In [1526]:
df_st_KN_2008 = df_2008.loc[(df_2008["State"]=="KARNATAKA")]

df_st_KN_2008
Out[1526]:
State Year Type Gender Age_group Total
98898 KARNATAKA 2008 Cancellation/Non-Settlement of Marriage Male 0-14 0
98899 KARNATAKA 2008 Drug Abuse/Addiction Male 15-29 4
98900 KARNATAKA 2008 Failure in Examination Female 15-29 51
98901 KARNATAKA 2008 Not having Children(Barrenness/Impotency Female 60+ 0
98902 KARNATAKA 2008 Others Male 45-59 585
... ... ... ... ... ... ...
232695 KARNATAKA 2008 By Self Infliction of injury Male 15-29 13
232696 KARNATAKA 2008 By touching electric wires Female 30-44 13
232697 KARNATAKA 2008 Public Sector Undertaking Male 15-29 60
232698 KARNATAKA 2008 Self-employed (Business activity) Male 30-44 248
232699 KARNATAKA 2008 Self-employed (Business activity) Male 60+ 32

566 rows × 6 columns

In [1527]:
t_KN_2008 = df_st_KN_2008.loc[:,"Total"]

s8_35 = np.sum(t_KN_2008)
s8_35
Out[1527]:
61110
In [1528]:
df_st_KER_2008 = df_2008.loc[(df_2008["State"]=="KERALA")]

df_st_KER_2008
Out[1528]:
State Year Type Gender Age_group Total
103747 KERALA 2008 Cancellation/Non-Settlement of Marriage Female 45-59 0
103748 KERALA 2008 Cancer Female 0-14 0
103749 KERALA 2008 Causes Not known Male 30-44 139
103750 KERALA 2008 Fall in Social Reputation Male 60+ 3
103751 KERALA 2008 Love Affairs Female 30-44 4
... ... ... ... ... ... ...
232891 KERALA 2008 House Wife Female 15-29 258
232892 KERALA 2008 Professional Activity Male 45-59 48
232893 KERALA 2008 Service (Government) Male 45-59 36
232894 KERALA 2008 Service (Private) Male 30-44 176
232895 KERALA 2008 Unemployed Female 30-44 46

566 rows × 6 columns

In [1529]:
t_KER_2008 = df_st_KER_2008.loc[:,"Total"]

s8_36 = np.sum(t_KER_2008)
s8_36
Out[1529]:
42845
In [1530]:
df_st_LD_2008 = df_2008.loc[(df_2008["State"]=="LAKSHADWEEP")]

df_st_LD_2008
Out[1530]:
State Year Type Gender Age_group Total
110293 LAKSHADWEEP 2008 Causes Not known Male 0-14 0
110294 LAKSHADWEEP 2008 Death of Dear Person Male 30-44 0
110295 LAKSHADWEEP 2008 Divorce Male 15-29 0
110296 LAKSHADWEEP 2008 Insanity/Mental Illness Male 60+ 0
110297 LAKSHADWEEP 2008 Other Prolonged Illness Male 45-59 0
... ... ... ... ... ... ...
233110 LAKSHADWEEP 2008 By Jumping from (Building) Female 0-14 0
233111 LAKSHADWEEP 2008 By Jumping from (Building) Male 45-59 0
233112 LAKSHADWEEP 2008 Others Female 60+ 0
233113 LAKSHADWEEP 2008 Service (Private) Male 0-14 0
233114 LAKSHADWEEP 2008 Seperated Female 0-100+ 0

556 rows × 6 columns

In [1531]:
t_LD_2008 = df_st_LD_2008.loc[:,"Total"]

s8_37 = np.sum(t_LD_2008)
s8_37
Out[1531]:
0
In [1532]:
df_st_MP_2008 = df_2008.loc[(df_2008["State"]=="MADHYA PRADESH")]

df_st_MP_2008
Out[1532]:
State Year Type Gender Age_group Total
116311 MADHYA PRADESH 2008 Causes Not known Female 0-14 39
116312 MADHYA PRADESH 2008 Causes Not known Female 15-29 295
116313 MADHYA PRADESH 2008 Death of Dear Person Female 0-14 1
116314 MADHYA PRADESH 2008 Drug Abuse/Addiction Male 0-14 0
116315 MADHYA PRADESH 2008 Not having Children(Barrenness/Impotency Male 0-14 0
... ... ... ... ... ... ...
233332 MADHYA PRADESH 2008 By Over Alcoholism Male 15-29 47
233333 MADHYA PRADESH 2008 Farming/Agriculture Activity Male 0-14 6
233334 MADHYA PRADESH 2008 Others Male 30-44 308
233335 MADHYA PRADESH 2008 Student Female 0-14 50
233336 MADHYA PRADESH 2008 Divorcee Female 0-100+ 69

566 rows × 6 columns

In [1533]:
t_MP_2008 = df_st_MP_2008.loc[:,"Total"]

s8_38 = np.sum(t_MP_2008)
s8_38
Out[1533]:
38145
In [1534]:
df_st_MH_2008 = df_2008.loc[(df_2008["State"]=="MAHARASHTRA")]

df_st_MH_2008
Out[1534]:
State Year Type Gender Age_group Total
122095 MAHARASHTRA 2008 Divorce Female 0-14 0
122096 MAHARASHTRA 2008 Illness (Aids/STD) Female 45-59 3
122097 MAHARASHTRA 2008 Physical Abuse (Rape/Incest Etc.) Male 60+ 2
122098 MAHARASHTRA 2008 Professional/Career Problem Female 60+ 0
122099 MAHARASHTRA 2008 Property Dispute Female 0-14 0
... ... ... ... ... ... ...
233566 MAHARASHTRA 2008 By Jumping from (Building) Female 15-29 7
233567 MAHARASHTRA 2008 By Overdose of sleeping pills Female 30-44 1
233568 MAHARASHTRA 2008 By Self Infliction of injury Female 30-44 1
233569 MAHARASHTRA 2008 Others Female 60+ 14
233570 MAHARASHTRA 2008 Service (Government) Female 45-59 0

566 rows × 6 columns

In [1535]:
t_MH_2008 = df_st_MH_2008.loc[:,"Total"]

s8_39 = np.sum(t_MH_2008)
s8_39
Out[1535]:
71870
In [1536]:
df_st_MN_2008 = df_2008.loc[(df_2008["State"]=="MANIPUR")]

df_st_MN_2008
Out[1536]:
State Year Type Gender Age_group Total
127641 MANIPUR 2008 Bankruptcy or Sudden change in Economic Female 45-59 0
127642 MANIPUR 2008 Cancellation/Non-Settlement of Marriage Female 30-44 0
127643 MANIPUR 2008 Dowry Dispute Male 15-29 0
127644 MANIPUR 2008 Family Problems Male 15-29 0
127645 MANIPUR 2008 Ideological Causes/Hero Worshipping Male 15-29 0
... ... ... ... ... ... ...
233776 MANIPUR 2008 Professional Activity Female 45-59 0
233777 MANIPUR 2008 Self-employed (Business activity) Female 45-59 0
233778 MANIPUR 2008 Service (Government) Female 45-59 0
233779 MANIPUR 2008 Student Male 45-59 0
233780 MANIPUR 2008 Divorcee Female 0-100+ 0

559 rows × 6 columns

In [1537]:
t_MN_2008 = df_st_MN_2008.loc[:,"Total"]

s8_40 = np.sum(t_MN_2008)
s8_40
Out[1537]:
170
In [1538]:
df_st_MG_2008 = df_2008.loc[(df_2008["State"]=="MEGHALAYA")]

df_st_MG_2008
Out[1538]:
State Year Type Gender Age_group Total
132711 MEGHALAYA 2008 Dowry Dispute Male 45-59 0
132712 MEGHALAYA 2008 Drug Abuse/Addiction Female 60+ 0
132713 MEGHALAYA 2008 Fall in Social Reputation Male 30-44 0
132714 MEGHALAYA 2008 Others Male 45-59 1
132715 MEGHALAYA 2008 Others Male 60+ 0
... ... ... ... ... ... ...
233970 MEGHALAYA 2008 Others Male 45-59 2
233971 MEGHALAYA 2008 Professional Activity Female 45-59 0
233972 MEGHALAYA 2008 Service (Government) Female 45-59 0
233973 MEGHALAYA 2008 Student Male 45-59 0
233974 MEGHALAYA 2008 Divorcee Female 0-100+ 0

562 rows × 6 columns

In [1539]:
t_MG_2008 = df_st_MG_2008.loc[:,"Total"]

s8_41 = np.sum(t_MG_2008)
s8_41
Out[1539]:
424
In [1540]:
df_st_MZ_2008 = df_2008.loc[(df_2008["State"]=="MIZORAM")]

df_st_MZ_2008
Out[1540]:
State Year Type Gender Age_group Total
140150 MIZORAM 2008 Death of Dear Person Male 30-44 0
140151 MIZORAM 2008 Divorce Male 15-29 0
140152 MIZORAM 2008 Family Problems Female 15-29 0
140153 MIZORAM 2008 Not having Children(Barrenness/Impotency Female 45-59 0
140154 MIZORAM 2008 Paralysis Female 30-44 0
... ... ... ... ... ... ...
234187 MIZORAM 2008 By Self Infliction of injury Male 60+ 0
234188 MIZORAM 2008 By touching electric wires Female 30-44 0
234189 MIZORAM 2008 By touching electric wires Female 60+ 0
234190 MIZORAM 2008 Retired Person Female 45-59 0
234191 MIZORAM 2008 Married Female 0-100+ 2

562 rows × 6 columns

In [1541]:
t_MN_2008 = df_st_MN_2008.loc[:,"Total"]

s8_42 = np.sum(t_MN_2008)
s8_42
Out[1541]:
170
In [1542]:
df_st_NG_2008 = df_2008.loc[(df_2008["State"]=="NAGALAND")]

df_st_NG_2008
Out[1542]:
State Year Type Gender Age_group Total
144601 NAGALAND 2008 Cancer Female 30-44 0
144602 NAGALAND 2008 Cancer Male 15-29 0
144603 NAGALAND 2008 Drug Abuse/Addiction Female 0-14 0
144604 NAGALAND 2008 Failure in Examination Male 0-14 0
144605 NAGALAND 2008 Fall in Social Reputation Male 0-14 0
... ... ... ... ... ... ...
234377 NAGALAND 2008 By Machine Female 15-29 0
234378 NAGALAND 2008 House Wife Female 60+ 0
234379 NAGALAND 2008 Service (Government) Female 60+ 0
234380 NAGALAND 2008 Unemployed Male 15-29 0
234381 NAGALAND 2008 Never Married Female 0-100+ 4

560 rows × 6 columns

In [1543]:
t_NG_2008 = df_st_NG_2008.loc[:,"Total"]

s8_43 = np.sum(t_NG_2008)
s8_43
Out[1543]:
210
In [1544]:
df_st_OD_2008 = df_2008.loc[(df_2008["State"]=="ODISHA")]

df_st_OD_2008
Out[1544]:
State Year Type Gender Age_group Total
149005 ODISHA 2008 Bankruptcy or Sudden change in Economic Male 0-14 0
149006 ODISHA 2008 Bankruptcy or Sudden change in Economic Male 15-29 0
149007 ODISHA 2008 Illness (Aids/STD) Male 45-59 6
149008 ODISHA 2008 Insanity/Mental Illness Female 0-14 0
149009 ODISHA 2008 Physical Abuse (Rape/Incest Etc.) Male 0-14 0
... ... ... ... ... ... ...
234572 ODISHA 2008 By Jumping off Moving Vehicles/Trains Male 45-59 2
234573 ODISHA 2008 By touching electric wires Female 30-44 0
234574 ODISHA 2008 Public Sector Undertaking Male 15-29 53
234575 ODISHA 2008 Self-employed (Business activity) Male 15-29 50
234576 ODISHA 2008 Student Male 15-29 95

566 rows × 6 columns

In [1545]:
t_OD_2008 = df_st_OD_2008.loc[:,"Total"]

s8_44 = np.sum(t_OD_2008)
s8_44
Out[1545]:
24520
In [1546]:
df_st_PD_2008 = df_2008.loc[(df_2008["State"]=="PUDUCHERRY")]

df_st_PD_2008
Out[1546]:
State Year Type Gender Age_group Total
155549 PUDUCHERRY 2008 Bankruptcy or Sudden change in Economic Female 30-44 0
155550 PUDUCHERRY 2008 Bankruptcy or Sudden change in Economic Male 60+ 0
155551 PUDUCHERRY 2008 Causes Not known Male 30-44 4
155552 PUDUCHERRY 2008 Causes Not known Male 45-59 5
155553 PUDUCHERRY 2008 Illegitimate Pregnancy Male 30-44 0
... ... ... ... ... ... ...
234808 PUDUCHERRY 2008 By Jumping off Moving Vehicles/Trains Male 15-29 0
234809 PUDUCHERRY 2008 Others Female 30-44 0
234810 PUDUCHERRY 2008 Professional Activity Male 45-59 0
234811 PUDUCHERRY 2008 Public Sector Undertaking Male 45-59 0
234812 PUDUCHERRY 2008 Married Female 0-100+ 107

563 rows × 6 columns

In [1547]:
t_PD_2008 = df_st_PD_2008.loc[:,"Total"]

s8_45 = np.sum(t_PD_2008)
s8_45
Out[1547]:
2535
In [1548]:
df_st_PB_2008 = df_2008.loc[(df_2008["State"]=="PUNJAB")]

df_st_PB_2008
Out[1548]:
State Year Type Gender Age_group Total
160027 PUNJAB 2008 Bankruptcy or Sudden change in Economic Male 0-14 1
160028 PUNJAB 2008 Bankruptcy or Sudden change in Economic Male 30-44 5
160029 PUNJAB 2008 Dowry Dispute Female 30-44 11
160030 PUNJAB 2008 Poverty Male 0-14 0
160031 PUNJAB 2008 Unemployment Male 0-14 0
... ... ... ... ... ... ...
234992 PUNJAB 2008 Farming/Agriculture Activity Male 15-29 18
234993 PUNJAB 2008 Self-employed (Business activity) Male 15-29 26
234994 PUNJAB 2008 Service (Private) Male 45-59 12
234995 PUNJAB 2008 Student Female 30-44 0
234996 PUNJAB 2008 Unemployed Female 30-44 0

566 rows × 6 columns

In [1549]:
t_PB_2008 = df_st_PB_2008.loc[:,"Total"]

s8_46 = np.sum(t_PB_2008)
s8_46
Out[1549]:
4345
In [1550]:
df_st_RJ_2008 = df_2008.loc[(df_2008["State"]=="RAJASTHAN")]

df_st_RJ_2008
Out[1550]:
State Year Type Gender Age_group Total
167020 RAJASTHAN 2008 Bankruptcy or Sudden change in Economic Male 30-44 23
167021 RAJASTHAN 2008 Causes Not known Male 15-29 286
167022 RAJASTHAN 2008 Causes Not known Male 30-44 341
167023 RAJASTHAN 2008 Divorce Female 45-59 0
167024 RAJASTHAN 2008 Ideological Causes/Hero Worshipping Female 30-44 0
... ... ... ... ... ... ...
235194 RAJASTHAN 2008 By Machine Female 0-14 0
235195 RAJASTHAN 2008 By touching electric wires Male 60+ 3
235196 RAJASTHAN 2008 Others Male 60+ 45
235197 RAJASTHAN 2008 Retired Person Male 30-44 5
235198 RAJASTHAN 2008 Student Male 45-59 0

566 rows × 6 columns

In [1551]:
t_RJ_2008 = df_st_RJ_2008.loc[:,"Total"]

s8_47 = np.sum(t_RJ_2008)
s8_47
Out[1551]:
25830
In [1552]:
df_st_SM_2008 = df_2008.loc[(df_2008["State"]=="SIKKIM")]

df_st_SM_2008
Out[1552]:
State Year Type Gender Age_group Total
171521 SIKKIM 2008 Cancellation/Non-Settlement of Marriage Female 30-44 4
171522 SIKKIM 2008 Cancer Female 0-14 0
171523 SIKKIM 2008 Causes Not known Female 30-44 1
171524 SIKKIM 2008 Divorce Male 15-29 0
171525 SIKKIM 2008 Failure in Examination Female 15-29 2
... ... ... ... ... ... ...
235440 SIKKIM 2008 Self-employed (Business activity) Male 15-29 0
235441 SIKKIM 2008 Self-employed (Business activity) Male 60+ 0
235442 SIKKIM 2008 Student Female 45-59 0
235443 SIKKIM 2008 Unemployed Male 30-44 11
235444 SIKKIM 2008 Unemployed Male 45-59 6

564 rows × 6 columns

In [1553]:
t_SM_2008 = df_st_SM_2008.loc[:,"Total"]

s8_48 = np.sum(t_SM_2008)
s8_48
Out[1553]:
1435
In [1554]:
df_st_TN_2008 = df_2008.loc[(df_2008["State"]=="TAMIL NADU")]

df_st_TN_2008
Out[1554]:
State Year Type Gender Age_group Total
177136 TAMIL NADU 2008 Cancellation/Non-Settlement of Marriage Female 15-29 45
177137 TAMIL NADU 2008 Drug Abuse/Addiction Male 30-44 79
177138 TAMIL NADU 2008 Fall in Social Reputation Female 60+ 9
177139 TAMIL NADU 2008 Family Problems Male 15-29 387
177140 TAMIL NADU 2008 Love Affairs Female 15-29 295
... ... ... ... ... ... ...
235654 TAMIL NADU 2008 Others Female 0-14 40
235655 TAMIL NADU 2008 Professional Activity Female 30-44 49
235656 TAMIL NADU 2008 Unemployed Male 30-44 134
235657 TAMIL NADU 2008 Never Married Female 0-100+ 914
235658 TAMIL NADU 2008 Never Married Male 0-100+ 1442

565 rows × 6 columns

In [1555]:
t_TN_2008 = df_st_TN_2008.loc[:,"Total"]

s8_49 = np.sum(t_TN_2008)
s8_49
Out[1555]:
72125
In [1556]:
df_st_TP_2008 = df_2008.loc[(df_2008["State"]=="TRIPURA")]

df_st_TP_2008
Out[1556]:
State Year Type Gender Age_group Total
181309 TRIPURA 2008 Fall in Social Reputation Female 60+ 0
181310 TRIPURA 2008 Family Problems Male 0-14 0
181311 TRIPURA 2008 Insanity/Mental Illness Female 30-44 0
181312 TRIPURA 2008 Other Prolonged Illness Female 45-59 3
181313 TRIPURA 2008 Other Prolonged Illness Male 30-44 9
... ... ... ... ... ... ...
235871 TRIPURA 2008 Student Female 0-14 13
235872 TRIPURA 2008 Student Female 30-44 0
235873 TRIPURA 2008 Student Female 60+ 0
235874 TRIPURA 2008 Unemployed Female 15-29 13
235875 TRIPURA 2008 Never Married Female 0-100+ 60

565 rows × 6 columns

In [1557]:
t_TP_2008 = df_st_TP_2008.loc[:,"Total"]

s8_50 = np.sum(t_TP_2008)
s8_50
Out[1557]:
3760
In [1558]:
df_st_UP_2008 = df_2008.loc[(df_2008["State"]=="UTTAR PRADESH")]

df_st_UP_2008
Out[1558]:
State Year Type Gender Age_group Total
187789 UTTAR PRADESH 2008 Bankruptcy or Sudden change in Economic Female 30-44 2
187790 UTTAR PRADESH 2008 Death of Dear Person Male 30-44 2
187791 UTTAR PRADESH 2008 Others Male 0-14 5
187792 UTTAR PRADESH 2008 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
187793 UTTAR PRADESH 2008 Professional/Career Problem Male 45-59 0
... ... ... ... ... ... ...
236059 UTTAR PRADESH 2008 House Wife Female 15-29 618
236060 UTTAR PRADESH 2008 Professional Activity Female 30-44 1
236061 UTTAR PRADESH 2008 Public Sector Undertaking Male 0-14 0
236062 UTTAR PRADESH 2008 Self-employed (Business activity) Female 30-44 10
236063 UTTAR PRADESH 2008 Student Male 15-29 148

566 rows × 6 columns

In [1559]:
t_UP_2008 = df_st_UP_2008.loc[:,"Total"]

s8_51 = np.sum(t_UP_2008)
s8_51
Out[1559]:
20440
In [1560]:
df_st_UK_2008 = df_2008.loc[(df_2008["State"]=="UTTARAKHAND")]

df_st_UK_2008
Out[1560]:
State Year Type Gender Age_group Total
192269 UTTARAKHAND 2008 Bankruptcy or Sudden change in Economic Female 15-29 0
192270 UTTARAKHAND 2008 Failure in Examination Female 30-44 0
192271 UTTARAKHAND 2008 Love Affairs Male 60+ 0
192272 UTTARAKHAND 2008 Poverty Female 30-44 0
192273 UTTARAKHAND 2008 Poverty Male 15-29 0
... ... ... ... ... ... ...
236278 UTTARAKHAND 2008 By Consuming Other Poison Female 45-59 3
236279 UTTARAKHAND 2008 By Drowning Female 15-29 2
236280 UTTARAKHAND 2008 By Fire/Self Immolation Female 60+ 0
236281 UTTARAKHAND 2008 By Jumping from (Building) Female 45-59 0
236282 UTTARAKHAND 2008 Service (Private) Female 0-14 0

563 rows × 6 columns

In [1561]:
t_UK_2008 = df_st_UK_2008.loc[:,"Total"]

s8_52 = np.sum(t_UK_2008)
s8_52
Out[1561]:
948
In [1562]:
df_st_WB_2008 = df_2008.loc[(df_2008["State"]=="WEST BENGAL")]

df_st_WB_2008
Out[1562]:
State Year Type Gender Age_group Total
198425 WEST BENGAL 2008 Failure in Examination Male 30-44 8
198426 WEST BENGAL 2008 Other Prolonged Illness Female 0-14 3
198427 WEST BENGAL 2008 Other Prolonged Illness Female 60+ 32
198428 WEST BENGAL 2008 Poverty Female 45-59 8
198429 WEST BENGAL 2008 Professional/Career Problem Male 45-59 12
... ... ... ... ... ... ...
236511 WEST BENGAL 2008 By Self Infliction of injury Male 60+ 0
236512 WEST BENGAL 2008 Farming/Agriculture Activity Female 30-44 50
236513 WEST BENGAL 2008 Others Female 60+ 30
236514 WEST BENGAL 2008 Others Male 0-14 89
236515 WEST BENGAL 2008 Retired Person Female 45-59 0

566 rows × 6 columns

In [1563]:
t_WB_2008 = df_st_WB_2008.loc[:,"Total"]

s8_53 = np.sum(t_WB_2008)
s8_53
Out[1563]:
74260
In [1564]:
t_ANm_2008 = np.sum(df_st_AN_2008.where(df_st_AN_2008["Gender"]=="Male")["Total"])
t_ANm_2008
Out[1564]:
489.0
In [1565]:
t_ANfm_2008 = np.sum(df_st_AN_2008.where(df_st_AN_2008["Gender"]=="Female")["Total"])
t_ANfm_2008
Out[1565]:
225.0
In [1566]:
t_APm_2008 = np.sum(df_st_AP_2008.where(df_st_AP_2008["Gender"]=="Male")["Total"])
t_APm_2008
Out[1566]:
48605.0
In [1567]:
t_APfm_2008 = np.sum(df_st_AP_2008.where(df_st_AP_2008["Gender"]=="Female")["Total"])
t_APfm_2008
Out[1567]:
23124.0
In [1568]:
t_ARPm_2008 = np.sum(df_st_ARP_2008.where(df_st_ARP_2008["Gender"]=="Male")["Total"])
t_ARPm_2008
Out[1568]:
384.0
In [1569]:
t_ARPfm_2008 = np.sum(df_st_ARP_2008.where(df_st_ARP_2008["Gender"]=="Female")["Total"])
t_ARPfm_2008
Out[1569]:
165.0
In [1570]:
t_ASm_2008 = np.sum(df_st_AS_2008.where(df_st_AS_2008["Gender"]=="Male")["Total"])
t_ASm_2008
Out[1570]:
9850.0
In [1571]:
t_ASfm_2008 = np.sum(df_st_AS_2008.where(df_st_AS_2008["Gender"]=="Female")["Total"])
t_ASfm_2008
Out[1571]:
5095.0
In [1572]:
t_BHm_2008 = np.sum(df_st_BH_2008.where(df_st_BH_2008["Gender"]=="Male")["Total"])
t_BHm_2008
Out[1572]:
3045.0
In [1573]:
t_BHfm_2008 = np.sum(df_st_BH_2008.where(df_st_BH_2008["Gender"]=="Female")["Total"])
t_BHfm_2008
Out[1573]:
2030.0
In [1574]:
t_CHm_2008 = np.sum(df_st_CH_2008.where(df_st_CH_2008["Gender"]=="Male")["Total"])
t_CHm_2008
Out[1574]:
290.0
In [1575]:
t_CHfm_2008 = np.sum(df_st_CH_2008.where(df_st_CH_2008["Gender"]=="Female")["Total"])
t_CHfm_2008
Out[1575]:
125.0
In [1576]:
t_CTm_2008 = np.sum(df_st_CT_2008.where(df_st_CT_2008["Gender"]=="Male")["Total"])
t_CTm_2008
Out[1576]:
16240.0
In [1577]:
t_CTfm_2008 = np.sum(df_st_CT_2008.where(df_st_CT_2008["Gender"]=="Female")["Total"])
t_CTfm_2008
Out[1577]:
8485.0
In [1578]:
t_DNm_2008 = np.sum(df_st_DN_2008.where(df_st_DN_2008["Gender"]=="Male")["Total"])
t_DNm_2008
Out[1578]:
160.0
In [1579]:
t_DNfm_2008 = np.sum(df_st_DN_2008.where(df_st_DN_2008["Gender"]=="Female")["Total"])
t_DNfm_2008
Out[1579]:
140.0
In [1580]:
t_DDm_2008 = np.sum(df_st_DD_2008.where(df_st_DD_2008["Gender"]=="Male")["Total"])
t_DDm_2008
Out[1580]:
70.0
In [1581]:
t_DDfm_2008 = np.sum(df_st_DD_2008.where(df_st_DD_2008["Gender"]=="Female")["Total"])
t_DDfm_2008
Out[1581]:
25.0
In [1582]:
t_DLm_2008 = np.sum(df_st_DL_2008.where(df_st_DL_2008["Gender"]=="Male")["Total"])
t_DLm_2008
Out[1582]:
3975.0
In [1583]:
t_DLfm_2008 = np.sum(df_st_DL_2008.where(df_st_DL_2008["Gender"]=="Female")["Total"])
t_DLfm_2008
Out[1583]:
2536.0
In [1584]:
t_GOAm_2008 = np.sum(df_st_GOA_2008.where(df_st_GOA_2008["Gender"]=="Male")["Total"])
t_GOAm_2008
Out[1584]:
911.0
In [1585]:
t_GOAfm_2008 = np.sum(df_st_GOA_2008.where(df_st_GOA_2008["Gender"]=="Female")["Total"])
t_GOAfm_2008
Out[1585]:
520.0
In [1586]:
t_GJm_2008 = np.sum(df_st_GJ_2008.where(df_st_GJ_2008["Gender"]=="Male")["Total"])
t_GJm_2008
Out[1586]:
18675.0
In [1587]:
t_GJfm_2008 = np.sum(df_st_GJ_2008.where(df_st_GJ_2008["Gender"]=="Female")["Total"])
t_GJfm_2008
Out[1587]:
12143.0
In [1588]:
t_HRm_2008 = np.sum(df_st_HR_2008.where(df_st_HR_2008["Gender"]=="Male")["Total"])
t_HRm_2008
Out[1588]:
9870.0
In [1589]:
t_HRfm_2008 = np.sum(df_st_HR_2008.where(df_st_HR_2008["Gender"]=="Female")["Total"])
t_HRfm_2008
Out[1589]:
3410.0
In [1590]:
t_HPm_2008 = np.sum(df_st_HP_2008.where(df_st_HP_2008["Gender"]=="Male")["Total"])
t_HPm_2008
Out[1590]:
2085.0
In [1591]:
t_HPfm_2008 = np.sum(df_st_HP_2008.where(df_st_HP_2008["Gender"]=="Female")["Total"])
t_HPfm_2008
Out[1591]:
1063.0
In [1592]:
t_JKm_2008 = np.sum(df_st_JK_2008.where(df_st_JK_2008["Gender"]=="Male")["Total"])
t_JKm_2008
Out[1592]:
882.0
In [1593]:
t_JKfm_2008 = np.sum(df_st_JK_2008.where(df_st_JK_2008["Gender"]=="Female")["Total"])
t_JKfm_2008
Out[1593]:
665.0
In [1594]:
t_JHm_2008 = np.sum(df_st_JH_2008.where(df_st_JH_2008["Gender"]=="Male")["Total"])
t_JHm_2008
Out[1594]:
3010.0
In [1595]:
t_JHfm_2008 = np.sum(df_st_JH_2008.where(df_st_JH_2008["Gender"]=="Female")["Total"])
t_JHfm_2008
Out[1595]:
1545.0
In [1596]:
t_KNm_2008 = np.sum(df_st_KN_2008.where(df_st_KN_2008["Gender"]=="Male")["Total"])
t_KNm_2008
Out[1596]:
41080.0
In [1597]:
t_KNfm_2008 = np.sum(df_st_KN_2008.where(df_st_KN_2008["Gender"]=="Female")["Total"])
t_KNfm_2008
Out[1597]:
20030.0
In [1598]:
t_KERm_2008 = np.sum(df_st_KER_2008.where(df_st_KER_2008["Gender"]=="Male")["Total"])
t_KERm_2008
Out[1598]:
30650.0
In [1599]:
t_KERfm_2008 = np.sum(df_st_KER_2008.where(df_st_KER_2008["Gender"]=="Female")["Total"])
t_KERfm_2008
Out[1599]:
12195.0
In [1600]:
t_LDm_2008 = np.sum(df_st_LD_2008.where(df_st_LD_2008["Gender"]=="Male")["Total"])
t_LDm_2008
Out[1600]:
0.0
In [1601]:
t_LDfm_2008 = np.sum(df_st_LD_2008.where(df_st_LD_2008["Gender"]=="Female")["Total"])
t_LDfm_2008
Out[1601]:
0.0
In [1602]:
t_MPm_2008 = np.sum(df_st_MP_2008.where(df_st_MP_2008["Gender"]=="Male")["Total"])
t_MPm_2008
Out[1602]:
21825.0
In [1603]:
t_MPfm_2008 = np.sum(df_st_MP_2008.where(df_st_MP_2008["Gender"]=="Female")["Total"])
t_MPfm_2008
Out[1603]:
16320.0
In [1604]:
t_MHm_2008 = np.sum(df_st_MH_2008.where(df_st_MH_2008["Gender"]=="Male")["Total"])
t_MHm_2008
Out[1604]:
49445.0
In [1605]:
t_MHfm_2008 = np.sum(df_st_MH_2008.where(df_st_MH_2008["Gender"]=="Female")["Total"])
t_MHfm_2008
Out[1605]:
22425.0
In [1606]:
t_MNm_2008 = np.sum(df_st_MN_2008.where(df_st_MN_2008["Gender"]=="Male")["Total"])
t_MNm_2008
Out[1606]:
115.0
In [1607]:
t_MNfm_2008 = np.sum(df_st_MN_2008.where(df_st_MN_2008["Gender"]=="Female")["Total"])
t_MNfm_2008
Out[1607]:
55.0
In [1608]:
t_MGm_2008 = np.sum(df_st_MG_2008.where(df_st_MG_2008["Gender"]=="Male")["Total"])
t_MGm_2008
Out[1608]:
285.0
In [1609]:
t_MGfm_2008 = np.sum(df_st_MG_2008.where(df_st_MG_2008["Gender"]=="Female")["Total"])
t_MGfm_2008
Out[1609]:
139.0
In [1610]:
t_MZm_2008 = np.sum(df_st_MZ_2008.where(df_st_MZ_2008["Gender"]=="Male")["Total"])
t_MZm_2008
Out[1610]:
175.0
In [1611]:
t_MZfm_2008 = np.sum(df_st_MZ_2008.where(df_st_MZ_2008["Gender"]=="Female")["Total"])
t_MZfm_2008
Out[1611]:
30.0
In [1612]:
t_NGm_2008 = np.sum(df_st_NG_2008.where(df_st_NG_2008["Gender"]=="Male")["Total"])
t_NGm_2008
Out[1612]:
160.0
In [1613]:
t_NGfm_2008 = np.sum(df_st_NG_2008.where(df_st_NG_2008["Gender"]=="Female")["Total"])
t_MGfm_2008
Out[1613]:
139.0
In [1614]:
t_ODm_2008 = np.sum(df_st_OD_2008.where(df_st_OD_2008["Gender"]=="Male")["Total"])
t_ODm_2008
Out[1614]:
15775.0
In [1615]:
t_ODfm_2008 = np.sum(df_st_OD_2008.where(df_st_OD_2008["Gender"]=="Female")["Total"])
t_ODfm_2008
Out[1615]:
8745.0
In [1616]:
t_PDm_2008 = np.sum(df_st_PD_2008.where(df_st_PD_2008["Gender"]=="Male")["Total"])
t_PDm_2008
Out[1616]:
1670.0
In [1617]:
t_PDfm_2008 = np.sum(df_st_PD_2008.where(df_st_PD_2008["Gender"]=="Female")["Total"])
t_PDfm_2008
Out[1617]:
865.0
In [1618]:
t_PBm_2008 = np.sum(df_st_PB_2008.where(df_st_PB_2008["Gender"]=="Male")["Total"])
t_PBm_2008
Out[1618]:
3215.0
In [1619]:
t_PBfm_2008 = np.sum(df_st_PB_2008.where(df_st_PB_2008["Gender"]=="Female")["Total"])
t_PBfm_2008
Out[1619]:
1130.0
In [1620]:
t_RJm_2008 = np.sum(df_st_RJ_2008.where(df_st_RJ_2008["Gender"]=="Male")["Total"])
t_RJm_2008
Out[1620]:
18010.0
In [1621]:
t_RJfm_2008 = np.sum(df_st_RJ_2008.where(df_st_RJ_2008["Gender"]=="Female")["Total"])
t_RJfm_2008
Out[1621]:
7820.0
In [1622]:
t_SMm_2008 = np.sum(df_st_SM_2008.where(df_st_SM_2008["Gender"]=="Male")["Total"])
t_SMm_2008
Out[1622]:
1080.0
In [1623]:
t_SMfm_2008 = np.sum(df_st_SM_2008.where(df_st_SM_2008["Gender"]=="Female")["Total"])
t_SMfm_2008
Out[1623]:
355.0
In [1624]:
t_TNm_2008 = np.sum(df_st_TN_2008.where(df_st_TN_2008["Gender"]=="Male")["Total"])
t_TNm_2008
Out[1624]:
45215.0
In [1625]:
t_TNfm_2008 = np.sum(df_st_TN_2008.where(df_st_TN_2008["Gender"]=="Female")["Total"])
t_TNfm_2008
Out[1625]:
26910.0
In [1626]:
t_TPm_2008 = np.sum(df_st_TP_2008.where(df_st_TP_2008["Gender"]=="Male")["Total"])
t_TPm_2008
Out[1626]:
2210.0
In [1627]:
t_TPfm_2008 = np.sum(df_st_TP_2008.where(df_st_TP_2008["Gender"]=="Female")["Total"])
t_TPfm_2008
Out[1627]:
1550.0
In [1628]:
t_UPm_2008 = np.sum(df_st_UP_2008.where(df_st_UP_2008["Gender"]=="Male")["Total"])
t_UPm_2008
Out[1628]:
10895.0
In [1629]:
t_UPfm_2008 = np.sum(df_st_UP_2008.where(df_st_UP_2008["Gender"]=="Female")["Total"])
t_UPfm_2008
Out[1629]:
9545.0
In [1630]:
t_UKm_2008 = np.sum(df_st_UK_2008.where(df_st_UK_2008["Gender"]=="Male")["Total"])
t_UKm_2008
Out[1630]:
513.0
In [1631]:
t_UKfm_2008 = np.sum(df_st_UK_2008.where(df_st_UK_2008["Gender"]=="Female")["Total"])
t_UKfm_2008
Out[1631]:
435.0
In [1632]:
t_WBm_2008 = np.sum(df_st_WB_2008.where(df_st_WB_2008["Gender"]=="Male")["Total"])
t_WBm_2008
Out[1632]:
41845.0
In [1633]:
t_WBfm_2008 = np.sum(df_st_WB_2008.where(df_st_WB_2008["Gender"]=="Female")["Total"])
t_WBfm_2008
Out[1633]:
32415.0
In [1634]:
l_2008=list(df_2008.loc[:,"Type"].unique())
l_2008.sort()
print(l_2008,end=" ")
['Bankruptcy or Sudden change in Economic', 'By Consuming Insecticides', 'By Consuming Other Poison', 'By Drowning', 'By Fire-Arms', 'By Fire/Self Immolation', 'By Hanging', 'By Jumping from (Building)', 'By Jumping from (Other sites)', 'By Jumping off Moving Vehicles/Trains', 'By Machine', 'By Over Alcoholism', 'By Overdose of sleeping pills', 'By Self Infliction of injury', 'By coming under running vehicles/trains', 'By touching electric wires', 'Cancellation/Non-Settlement of Marriage', 'Cancer', 'Causes Not known', 'Death of Dear Person', 'Diploma', 'Divorce', 'Divorcee', 'Dowry Dispute', 'Drug Abuse/Addiction', 'Failure in Examination', 'Fall in Social Reputation', 'Family Problems', 'Farming/Agriculture Activity', 'Graduate', 'House Wife', 'Hr. Secondary/Intermediate/Pre-Universit', 'Ideological Causes/Hero Worshipping', 'Illegitimate Pregnancy', 'Illness (Aids/STD)', 'Insanity/Mental Illness', 'Love Affairs', 'Married', 'Matriculate/Secondary', 'Middle', 'Never Married', 'No Education', 'Not having Children(Barrenness/Impotency', 'Other Prolonged Illness', 'Others', 'Paralysis', 'Physical Abuse (Rape/Incest Etc.)', 'Post Graduate and Above', 'Poverty', 'Primary', 'Professional Activity', 'Professional/Career Problem', 'Property Dispute', 'Public Sector Undertaking', 'Retired Person', 'Self-employed (Business activity)', 'Seperated', 'Service (Government)', 'Service (Private)', 'Student', 'Suspected/Illicit Relation', 'Unemployed', 'Unemployment', 'Widowed/Widower'] 
In [1635]:
cause_l_2008=[]
for i in l_2008:
    rough= np.sum(df_2008.where(df_2008["Type"]==i)["Total"])
    cause_l_2008.append(rough)

print(cause_l_2008,end=" ")
[2970.0, 23895.0, 19424.0, 8351.0, 479.0, 10986.0, 40268.0, 670.0, 465.0, 497.0, 117.0, 1523.0, 660.0, 331.0, 3697.0, 985.0, 949.0, 741.0, 20124.0, 1019.0, 995.0, 410.0, 1407.0, 3038.0, 2730.0, 2189.0, 1151.0, 29777.0, 16196.0, 2777.0, 24367.0, 11094.0, 392.0, 238.0, 815.0, 8699.0, 3774.0, 87863.0, 22388.0, 29679.0, 27644.0, 25920.0, 743.0, 16651.0, 73674.0, 652.0, 367.0, 490.0, 3006.0, 31674.0, 3405.0, 1176.0, 1394.0, 3107.0, 886.0, 7016.0, 2737.0, 2070.0, 10501.0, 6060.0, 1264.0, 9001.0, 2080.0, 5366.0] 
In [1636]:
x1_2008 = set(df_2008.loc[:,"State"])
x1_2008
len(x1_2008)
Out[1636]:
35
In [1637]:
cause_df_2008 = pd.DataFrame(cause_l_2008,l_2008)
cause_df_2008.reset_index()
Out[1637]:
index 0
0 Bankruptcy or Sudden change in Economic 2970.0
1 By Consuming Insecticides 23895.0
2 By Consuming Other Poison 19424.0
3 By Drowning 8351.0
4 By Fire-Arms 479.0
... ... ...
59 Student 6060.0
60 Suspected/Illicit Relation 1264.0
61 Unemployed 9001.0
62 Unemployment 2080.0
63 Widowed/Widower 5366.0

64 rows × 2 columns

In [1638]:
cause_df_2008.plot.bar(stacked=True,figsize=(50,20))
plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("Causes",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths due to Different Causes in 2008",fontsize=55)
plt.legend(["Death Count"], prop={"size":30})
Out[1638]:
<matplotlib.legend.Legend at 0x10fd5580>
In [1639]:
s_2008=list(df_2008.loc[:,"State"].unique())
s_2008.sort()
print(s_2008,end=" ")
['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH', 'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR', 'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA', 'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA', 'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'] 
In [1640]:
state_s_2008 = [s8_19,s8_20,s8_21,s8_22,s8_23,s8_24,s8_25,s8_26,s8_27,s8_28,s8_29,s8_30,s8_31,s8_32,s8_33,s8_34,
           s8_35,s8_36,s8_37,s8_38,s8_39,s8_40,s8_41,s8_42,s8_43,s8_44,s8_45,s8_46,s8_47,s8_48,s8_49,s8_50,
           s8_51,s8_52,s8_53]
print(state_s_2008,end=" ")
[714, 71729, 549, 14945, 5075, 415, 24725, 300, 95, 6511, 1431, 30818, 13280, 3148, 1547, 4555, 61110, 42845, 0, 38145, 71870, 170, 424, 170, 210, 24520, 2535, 4345, 25830, 1435, 72125, 3760, 20440, 948, 74260] 
In [1641]:
state_m_2008=[t_ANm_2008, t_APm_2008, t_ARPm_2008, t_ASm_2008, t_BHm_2008, t_CHm_2008, t_CTm_2008, t_DNm_2008,
             t_DDm_2008, t_DLm_2008, t_GOAm_2008, t_GJm_2008, t_HRm_2008, t_HPm_2008,t_JKm_2008, t_JHm_2008,
             t_KNm_2008, t_KERm_2008, t_LDm_2008,t_MPm_2008,t_MHm_2008,t_MNm_2008,t_MGm_2008,t_MZm_2008,
             t_NGm_2008, t_ODm_2008, t_PDm_2008,t_PBm_2008,t_RJm_2008,t_SMm_2008,t_TNm_2008,t_TPm_2008,
             t_UPm_2008, t_UKm_2008, t_WBm_2008]
print(state_m_2008,end=" ")
[489.0, 48605.0, 384.0, 9850.0, 3045.0, 290.0, 16240.0, 160.0, 70.0, 3975.0, 911.0, 18675.0, 9870.0, 2085.0, 882.0, 3010.0, 41080.0, 30650.0, 0.0, 21825.0, 49445.0, 115.0, 285.0, 175.0, 160.0, 15775.0, 1670.0, 3215.0, 18010.0, 1080.0, 45215.0, 2210.0, 10895.0, 513.0, 41845.0] 
In [1642]:
state_fm_2008=[t_ANfm_2008, t_APfm_2008, t_ARPfm_2008, t_ASfm_2008, t_BHfm_2008, t_CHfm_2008, t_CTfm_2008, t_DNfm_2008,
             t_DDfm_2008, t_DLfm_2008, t_GOAfm_2008, t_GJfm_2008, t_HRfm_2008, t_HPfm_2008,t_JKfm_2008, t_JHfm_2008,
             t_KNfm_2008, t_KERfm_2008, t_LDfm_2008,t_MPfm_2008,t_MHfm_2008,t_MNfm_2008,t_MGfm_2008,t_MZfm_2008,
             t_NGfm_2008, t_ODfm_2008, t_PDfm_2008,t_PBfm_2008,t_RJfm_2008,t_SMfm_2008,t_TNfm_2008,t_TPfm_2008,
             t_UPfm_2008, t_UKfm_2008, t_WBfm_2008]
print(state_fm_2008,end=" ")
[225.0, 23124.0, 165.0, 5095.0, 2030.0, 125.0, 8485.0, 140.0, 25.0, 2536.0, 520.0, 12143.0, 3410.0, 1063.0, 665.0, 1545.0, 20030.0, 12195.0, 0.0, 16320.0, 22425.0, 55.0, 139.0, 30.0, 50.0, 8745.0, 865.0, 1130.0, 7820.0, 355.0, 26910.0, 1550.0, 9545.0, 435.0, 32415.0] 
In [1643]:
df_state_2008 = {
    
    "State":['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH',
             'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR',
             'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA',
             'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA',
             'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'],
                   
    "Total":[s8_19,s8_20,s8_21,s8_22,s8_23,s8_24,s8_25,s8_26,s8_27,s8_28,s8_29,s8_30,s8_31,s8_32,s8_33,s8_34,
           s8_35,s8_36,s8_37,s8_38,s8_39,s8_40,s8_41,s8_42,s8_43,s8_44,s8_45,s8_46,s8_47,s8_48,s8_49,s8_50,
           s8_51,s8_52,s8_53],
       
    "Male":[t_ANm_2008, t_APm_2008, t_ARPm_2008, t_ASm_2008, t_BHm_2008, t_CHm_2008, t_CTm_2008, t_DNm_2008,
             t_DDm_2008, t_DLm_2008, t_GOAm_2008, t_GJm_2008, t_HRm_2008, t_HPm_2008,t_JKm_2008, t_JHm_2008,
             t_KNm_2008, t_KERm_2008, t_LDm_2008,t_MPm_2008,t_MHm_2008,t_MNm_2008,t_MGm_2008,t_MZm_2008,
             t_NGm_2008, t_ODm_2008, t_PDm_2008,t_PBm_2008,t_RJm_2008,t_SMm_2008,t_TNm_2008,t_TPm_2008,
             t_UPm_2008, t_UKm_2008, t_WBm_2008],
                 
    "Female":[t_ANfm_2008, t_APfm_2008, t_ARPfm_2008, t_ASfm_2008, t_BHfm_2008, t_CHfm_2008, t_CTfm_2008, t_DNfm_2008,
             t_DDfm_2008, t_DLfm_2008, t_GOAfm_2008, t_GJfm_2008, t_HRfm_2008, t_HPfm_2008,t_JKfm_2008, t_JHfm_2008,
             t_KNfm_2008, t_KERfm_2008, t_LDfm_2008,t_MPfm_2008,t_MHfm_2008,t_MNfm_2008,t_MGfm_2008,t_MZfm_2008,
             t_NGfm_2008, t_ODfm_2008, t_PDfm_2008,t_PBfm_2008,t_RJfm_2008,t_SMfm_2008,t_TNfm_2008,t_TPfm_2008,
             t_UPfm_2008, t_UKfm_2008, t_WBfm_2008]
                  

}

df_All_st_2008 = pd.DataFrame(df_state_2008)
df_All_st_2008
Out[1643]:
State Total Male Female
0 A & N ISLANDS 714 489.0 225.0
1 ANDHRA PRADESH 71729 48605.0 23124.0
2 ARUNACHAL PRADESH 549 384.0 165.0
3 ASSAM 14945 9850.0 5095.0
4 BIHAR 5075 3045.0 2030.0
5 CHANDIGARH 415 290.0 125.0
6 CHHATTISGARH 24725 16240.0 8485.0
7 D & N HAVELI 300 160.0 140.0
8 DAMAN & DIU 95 70.0 25.0
9 DELHI (UT) 6511 3975.0 2536.0
10 GOA 1431 911.0 520.0
11 GUJARAT 30818 18675.0 12143.0
12 HARYANA 13280 9870.0 3410.0
13 HIMACHAL PRADESH 3148 2085.0 1063.0
14 JAMMU & KASHMIR 1547 882.0 665.0
15 JHARKHAND 4555 3010.0 1545.0
16 KARNATAKA 61110 41080.0 20030.0
17 KERALA 42845 30650.0 12195.0
18 LAKSHADWEEP 0 0.0 0.0
19 MADHYA PRADESH 38145 21825.0 16320.0
20 MAHARASHTRA 71870 49445.0 22425.0
21 MANIPUR 170 115.0 55.0
22 MEGHALAYA 424 285.0 139.0
23 MIZORAM 170 175.0 30.0
24 NAGALAND 210 160.0 50.0
25 ODISHA 24520 15775.0 8745.0
26 PUDUCHERRY 2535 1670.0 865.0
27 PUNJAB 4345 3215.0 1130.0
28 RAJASTHAN 25830 18010.0 7820.0
29 SIKKIM 1435 1080.0 355.0
30 TAMIL NADU 72125 45215.0 26910.0
31 TRIPURA 3760 2210.0 1550.0
32 UTTAR PRADESH 20440 10895.0 9545.0
33 UTTARAKHAND 948 513.0 435.0
34 WEST BENGAL 74260 41845.0 32415.0
In [1644]:
pivot_2008 = pd.pivot_table(df_All_st_2008, values=None, index='State', columns=None,
                       fill_value=None, margins=False, dropna=True, margins_name='All', observed=False)

pivot_2008
Out[1644]:
Female Male Total
State
A & N ISLANDS 225.0 489.0 714
ANDHRA PRADESH 23124.0 48605.0 71729
ARUNACHAL PRADESH 165.0 384.0 549
ASSAM 5095.0 9850.0 14945
BIHAR 2030.0 3045.0 5075
CHANDIGARH 125.0 290.0 415
CHHATTISGARH 8485.0 16240.0 24725
D & N HAVELI 140.0 160.0 300
DAMAN & DIU 25.0 70.0 95
DELHI (UT) 2536.0 3975.0 6511
GOA 520.0 911.0 1431
GUJARAT 12143.0 18675.0 30818
HARYANA 3410.0 9870.0 13280
HIMACHAL PRADESH 1063.0 2085.0 3148
JAMMU & KASHMIR 665.0 882.0 1547
JHARKHAND 1545.0 3010.0 4555
KARNATAKA 20030.0 41080.0 61110
KERALA 12195.0 30650.0 42845
LAKSHADWEEP 0.0 0.0 0
MADHYA PRADESH 16320.0 21825.0 38145
MAHARASHTRA 22425.0 49445.0 71870
MANIPUR 55.0 115.0 170
MEGHALAYA 139.0 285.0 424
MIZORAM 30.0 175.0 170
NAGALAND 50.0 160.0 210
ODISHA 8745.0 15775.0 24520
PUDUCHERRY 865.0 1670.0 2535
PUNJAB 1130.0 3215.0 4345
RAJASTHAN 7820.0 18010.0 25830
SIKKIM 355.0 1080.0 1435
TAMIL NADU 26910.0 45215.0 72125
TRIPURA 1550.0 2210.0 3760
UTTAR PRADESH 9545.0 10895.0 20440
UTTARAKHAND 435.0 513.0 948
WEST BENGAL 32415.0 41845.0 74260
In [1645]:
pivot_2008.plot(kind='bar',figsize=(60,30))

plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("States",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths of Males And Females In Different State",fontsize=55)
plt.legend(["Female","Male","Total"], prop={"size":30})

plt.show
Out[1645]:
<function matplotlib.pyplot.show(close=None, block=None)>
In [1646]:
cause_l_percent_2008=[]
for i in cause_l_2008:
    p=i/np.sum(cause_l_2008)
    avg_2008_cause=p*100
    cause_l_percent_2008.append(avg_2008_cause)

print(cause_l_percent_2008,end=" ")
[0.475189355758431, 3.8231143622382855, 3.107770385943355, 1.3361300706864165, 0.07663828330245402, 1.757720627057954, 6.442735682720707, 0.10719759877378747, 0.07439833347733012, 0.07951821879189906, 0.018719580681392737, 0.24367454169026614, 0.10559763461298467, 0.05295881372257261, 0.5915067502487944, 0.1575964698390756, 0.15183659886018552, 0.11855734431548734, 3.219767877199551, 0.16303634798580513, 0.1591964339998784, 0.06559853059291472, 0.2251149574249537, 0.4860691120518901, 0.43679021589916384, 0.35023215479973246, 0.18415587490840207, 4.764213281622491, 2.5913019548362115, 0.4443100474549371, 3.898632670628178, 1.775000239994624, 0.06271859510346968, 0.03807914702710659, 0.13039707910542805, 1.391808823482354, 0.6038264742869759, 14.057765106061623, 3.581999763205304, 4.748533632846624, 4.422940926123255, 4.1471071048008525, 0.1188773371476479, 2.664100324152739, 11.787575958298534, 0.10431766328434244, 0.058718684701462694, 0.0783982438793371, 0.48094922673732105, 5.0677264829267825, 0.5447877967533528, 0.18815578531040905, 0.22303500401591003, 0.4971088647614293, 0.1417568246471279, 1.1225348552192431, 0.43791019081172583, 0.33119258128617923, 1.680122365259018, 0.9695782814464956, 0.20223546992547367, 1.4401277411385984, 0.332792545446982, 0.8585407686867814] 
In [1647]:
np.max(cause_l_percent_2008) #Married
Out[1647]:
14.057765106061623
In [1648]:
np.min(cause_l_percent_2008)  #Ideological Causes/Hero Worshipping
Out[1648]:
0.018719580681392737
In [1649]:
state_s_2008_percent=[]
tot=np.sum(state_s_2008)
for i in state_s_2008:
    xy=i/tot
    avg_state_2008=xy*100
    state_s_2008_percent.append(avg_state_2008)

print(state_s_2008_percent,end=" ")
[0.11424383859297672, 11.477025628061103, 0.08784295152317118, 2.39128034701966, 0.8120272841167463, 0.06640223111496546, 3.956132926066316, 0.048001612854191904, 0.015200510737160767, 1.041795004312145, 0.22896769331449537, 4.931045683134953, 2.1248713956788947, 0.5036969242166537, 0.24752831695144958, 0.7288244885028137, 9.777928538398891, 6.855430342459506, 0.0, 6.1034050744104995, 11.499586386102573, 0.027200913950708745, 0.06784227950059121, 0.027200913950708745, 0.03360112899793433, 3.9233318239492845, 0.4056136286179216, 0.6952233595048793, 4.132938866745923, 0.2296077148192179, 11.540387757028636, 0.6016202144392051, 3.2705098891322746, 0.1516850966192464, 11.881999235174302] 
In [1650]:
np.max(state_s_2008_percent) #Maharashtra
Out[1650]:
11.881999235174302
In [1651]:
np.min(state_s_2008_percent)  #Lakshdweep
Out[1651]:
0.0
In [1652]:
l_age_grp_2008=[s8_4,s8_5,s8_6,s8_7,s8_8,s8_54]
l_age_grp_2008
Out[1652]:
[7143, 133955, 130676, 75574, 27632, 250034]
In [1653]:
l_age_grp_2008_percent=[]
for i in l_age_grp_2008:
    yz=i/s8_1
    avg_2008_age_grp=yz*100
    l_age_grp_2008_percent.append(avg_2008_age_grp)
l_age_grp_2008_percent
Out[1653]:
[1.1428544000614387,
 21.432319916033883,
 20.907691667706644,
 12.091569148851065,
 4.421020969130292,
 40.00454389821668]
In [1654]:
np.max(l_age_grp_2008_percent)  #0-100+
Out[1654]:
40.00454389821668
In [1655]:
np.min(l_age_grp_2008_percent)  #0-14
Out[1655]:
1.1428544000614387
In [1656]:
total_male_percent_2008= (s8_2/s8_1)*100
total_male_percent_2008
Out[1656]:
64.43119674119299
In [1657]:
total_female_percent_2008= (s8_3/s8_1)*100
total_female_percent_2008
Out[1657]:
35.568803258807
In [ ]:
 

2009

In [1658]:
df_2009 = suicide_df.loc[(suicide_df["Year"]==2009)]

df_2009
Out[1658]:
State Year Type Gender Age_group Total
2510 A & N ISLANDS 2009 Cancellation/Non-Settlement of Marriage Male 0-14 0
2511 A & N ISLANDS 2009 Causes Not known Male 0-14 0
2512 A & N ISLANDS 2009 Failure in Examination Male 45-59 0
2513 A & N ISLANDS 2009 Family Problems Female 45-59 0
2514 A & N ISLANDS 2009 Not having Children(Barrenness/Impotency Female 45-59 0
... ... ... ... ... ... ...
236529 WEST BENGAL 2009 House Wife Male 15-29 0
236530 WEST BENGAL 2009 Self-employed (Business activity) Male 0-14 0
236531 WEST BENGAL 2009 Service (Government) Male 30-44 94
236532 WEST BENGAL 2009 Service (Government) Male 60+ 0
236533 WEST BENGAL 2009 Service (Private) Male 30-44 241

19708 rows × 6 columns

In [1659]:
t2009_dcount = df_2009.loc[:,"Total"]

s9_1 = np.sum(t2009_dcount)

s9_1
Out[1659]:
635429
In [1660]:
male_2009 = df_2009.loc[(df_2009["Gender"]=="Male")]

male_2009
Out[1660]:
State Year Type Gender Age_group Total
2510 A & N ISLANDS 2009 Cancellation/Non-Settlement of Marriage Male 0-14 0
2511 A & N ISLANDS 2009 Causes Not known Male 0-14 0
2512 A & N ISLANDS 2009 Failure in Examination Male 45-59 0
2515 A & N ISLANDS 2009 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 4
2516 A & N ISLANDS 2009 By Fire-Arms Male 30-44 0
... ... ... ... ... ... ...
236529 WEST BENGAL 2009 House Wife Male 15-29 0
236530 WEST BENGAL 2009 Self-employed (Business activity) Male 0-14 0
236531 WEST BENGAL 2009 Service (Government) Male 30-44 94
236532 WEST BENGAL 2009 Service (Government) Male 60+ 0
236533 WEST BENGAL 2009 Service (Private) Male 30-44 241

9862 rows × 6 columns

In [1661]:
m2009_count = male_2009.loc[:,"Total"]
s9_2 = np.sum(m2009_count)

s9_2
Out[1661]:
407099
In [1662]:
female_2009 = df_2009.loc[(df_2009["Gender"]=="Female")]

female_2009
Out[1662]:
State Year Type Gender Age_group Total
2513 A & N ISLANDS 2009 Family Problems Female 45-59 0
2514 A & N ISLANDS 2009 Not having Children(Barrenness/Impotency Female 45-59 0
2518 A & N ISLANDS 2009 Others Female 0-14 0
2519 A & N ISLANDS 2009 Others Female 30-44 1
2622 A & N ISLANDS 2009 Not having Children(Barrenness/Impotency Female 15-29 0
... ... ... ... ... ... ...
236521 WEST BENGAL 2009 Professional/Career Problem Female 60+ 0
236523 WEST BENGAL 2009 By Fire/Self Immolation Female 30-44 92
236524 WEST BENGAL 2009 By Hanging Female 30-44 823
236527 WEST BENGAL 2009 By touching electric wires Female 0-14 0
236528 WEST BENGAL 2009 Farming/Agriculture Activity Female 30-44 52

9846 rows × 6 columns

In [1663]:
fm2009_count = female_2009.loc[:,"Total"]
s9_3 = np.sum(fm2009_count)
s9_3
Out[1663]:
228330
In [1664]:
df_age_d014_2009 = df_2009.loc[(df_2009["Age_group"]=="0-14")]

df_age_d014_2009
Out[1664]:
State Year Type Gender Age_group Total
2510 A & N ISLANDS 2009 Cancellation/Non-Settlement of Marriage Male 0-14 0
2511 A & N ISLANDS 2009 Causes Not known Male 0-14 0
2518 A & N ISLANDS 2009 Others Female 0-14 0
2520 A & N ISLANDS 2009 Professional Activity Male 0-14 0
2625 A & N ISLANDS 2009 Unemployment Female 0-14 0
... ... ... ... ... ... ...
236069 UTTAR PRADESH 2009 Not having Children(Barrenness/Impotency Female 0-14 1
236077 UTTAR PRADESH 2009 House Wife Female 0-14 7
236517 WEST BENGAL 2009 Death of Dear Person Female 0-14 7
236527 WEST BENGAL 2009 By touching electric wires Female 0-14 0
236530 WEST BENGAL 2009 Self-employed (Business activity) Male 0-14 0

3753 rows × 6 columns

In [1665]:
t_014_2009 = df_age_d014_2009.loc[:,"Total"]

s9_4 = np.sum(t_014_2009)
s9_4
Out[1665]:
8851
In [1666]:
df_age_d1529_2009 = df_2009.loc[(df_2009["Age_group"]=="15-29")]

df_age_d1529_2009
Out[1666]:
State Year Type Gender Age_group Total
2620 A & N ISLANDS 2009 Dowry Dispute Male 15-29 0
2622 A & N ISLANDS 2009 Not having Children(Barrenness/Impotency Female 15-29 0
2623 A & N ISLANDS 2009 Professional/Career Problem Female 15-29 0
2632 A & N ISLANDS 2009 By Jumping off Moving Vehicles/Trains Female 15-29 0
2704 A & N ISLANDS 2009 Property Dispute Female 15-29 0
... ... ... ... ... ... ...
236299 UTTARAKHAND 2009 By Overdose of sleeping pills Male 15-29 0
236301 UTTARAKHAND 2009 By Self Infliction of injury Male 15-29 0
236519 WEST BENGAL 2009 Family Problems Male 15-29 535
236526 WEST BENGAL 2009 By Jumping off Moving Vehicles/Trains Male 15-29 16
236529 WEST BENGAL 2009 House Wife Male 15-29 0

3764 rows × 6 columns

In [1667]:
t_1529_2009 = df_age_d1529_2009.loc[:,"Total"]

s9_5 = np.sum(t_1529_2009)

s9_5
Out[1667]:
131745
In [1668]:
df_age_d3044_2009 = df_2009.loc[(df_2009["Age_group"]=="30-44")]

df_age_d3044_2009
Out[1668]:
State Year Type Gender Age_group Total
2516 A & N ISLANDS 2009 By Fire-Arms Male 30-44 0
2519 A & N ISLANDS 2009 Others Female 30-44 1
2619 A & N ISLANDS 2009 Bankruptcy or Sudden change in Economic Male 30-44 0
2703 A & N ISLANDS 2009 Paralysis Male 30-44 0
2707 A & N ISLANDS 2009 Professional Activity Female 30-44 0
... ... ... ... ... ... ...
236524 WEST BENGAL 2009 By Hanging Female 30-44 823
236525 WEST BENGAL 2009 By Jumping from (Other sites) Male 30-44 158
236528 WEST BENGAL 2009 Farming/Agriculture Activity Female 30-44 52
236531 WEST BENGAL 2009 Service (Government) Male 30-44 94
236533 WEST BENGAL 2009 Service (Private) Male 30-44 241

3766 rows × 6 columns

In [1669]:
t_3044_2009 = df_age_d3044_2009.loc[:,"Total"]

s9_6 = np.sum(t_3044_2009)
s9_6
c:\program files\python\python38-32\lib\site-packages\IPython\core\displayhook.py:275: UserWarning: Output cache limit (currently 1000 entries) hit.
Flushing oldest 200 entries.
  warn('Output cache limit (currently {sz} entries) hit.\n'
Out[1669]:
130452
In [1670]:
df_age_d4559_2009 = df_2009.loc[(df_2009["Age_group"]=="45-59")]

df_age_d4559_2009
Out[1670]:
State Year Type Gender Age_group Total
2512 A & N ISLANDS 2009 Failure in Examination Male 45-59 0
2513 A & N ISLANDS 2009 Family Problems Female 45-59 0
2514 A & N ISLANDS 2009 Not having Children(Barrenness/Impotency Female 45-59 0
2517 A & N ISLANDS 2009 By touching electric wires Male 45-59 0
2621 A & N ISLANDS 2009 Fall in Social Reputation Male 45-59 0
... ... ... ... ... ... ...
236290 UTTARAKHAND 2009 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
236291 UTTARAKHAND 2009 Property Dispute Female 45-59 0
236293 UTTARAKHAND 2009 By Consuming Insecticides Male 45-59 7
236305 UTTARAKHAND 2009 Retired Person Female 45-59 6
236518 WEST BENGAL 2009 Fall in Social Reputation Male 45-59 12

3761 rows × 6 columns

In [1671]:
t_4559_2009 = df_age_d4559_2009.loc[:,"Total"]

s9_7 = np.sum(t_4559_2009)

s9_7
Out[1671]:
79808
In [1672]:
df_age_d60_2009 = df_2009.loc[(df_2009["Age_group"]=="60+")]

df_age_d60_2009
Out[1672]:
State Year Type Gender Age_group Total
2624 A & N ISLANDS 2009 Suspected/Illicit Relation Male 60+ 0
2626 A & N ISLANDS 2009 Unemployment Female 60+ 0
2629 A & N ISLANDS 2009 By Consuming Other Poison Female 60+ 0
2634 A & N ISLANDS 2009 Professional Activity Male 60+ 0
2737 A & N ISLANDS 2009 Divorce Female 60+ 0
... ... ... ... ... ... ...
236298 UTTARAKHAND 2009 By Over Alcoholism Female 60+ 0
236300 UTTARAKHAND 2009 By Overdose of sleeping pills Male 60+ 0
236302 UTTARAKHAND 2009 By Self Infliction of injury Male 60+ 0
236521 WEST BENGAL 2009 Professional/Career Problem Female 60+ 0
236532 WEST BENGAL 2009 Service (Government) Male 60+ 0

3754 rows × 6 columns

In [1673]:
t_60_2009 = df_age_d60_2009.loc[:,"Total"]

s9_8 = np.sum(t_60_2009)
s9_8
Out[1673]:
30271
In [1674]:
df_age_d0100_2009 = df_2009.loc[(df_2009["Age_group"]=="0-100+")]

df_age_d0100_2009
Out[1674]:
State Year Type Gender Age_group Total
2515 A & N ISLANDS 2009 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 4
2705 A & N ISLANDS 2009 Matriculate/Secondary Female 0-100+ 13
2842 A & N ISLANDS 2009 Middle Male 0-100+ 43
2855 A & N ISLANDS 2009 Married Female 0-100+ 28
3012 A & N ISLANDS 2009 Never Married Female 0-100+ 17
... ... ... ... ... ... ...
235000 PUNJAB 2009 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 39
235463 SIKKIM 2009 Married Male 0-100+ 28
236074 UTTAR PRADESH 2009 No Education Male 0-100+ 479
236075 UTTAR PRADESH 2009 Post Graduate and Above Female 0-100+ 15
236292 UTTARAKHAND 2009 Post Graduate and Above Male 0-100+ 0

910 rows × 6 columns

In [1675]:
t_0100_2009 = df_age_d0100_2009.loc[:,"Total"]

s9_54 = np.sum(t_0100_2009)
s9_54
Out[1675]:
254302
In [1676]:
df_014m_2009 = df_age_d014_2009.loc[(df_age_d014_2009["Gender"]=="Male")]
df_014m_2009
Out[1676]:
State Year Type Gender Age_group Total
2510 A & N ISLANDS 2009 Cancellation/Non-Settlement of Marriage Male 0-14 0
2511 A & N ISLANDS 2009 Causes Not known Male 0-14 0
2520 A & N ISLANDS 2009 Professional Activity Male 0-14 0
2628 A & N ISLANDS 2009 By Consuming Insecticides Male 0-14 0
2630 A & N ISLANDS 2009 By Drowning Male 0-14 0
... ... ... ... ... ... ...
235666 TAMIL NADU 2009 Unemployment Male 0-14 4
235675 TAMIL NADU 2009 Farming/Agriculture Activity Male 0-14 5
235877 TRIPURA 2009 Failure in Examination Male 0-14 3
235881 TRIPURA 2009 Paralysis Male 0-14 0
236530 WEST BENGAL 2009 Self-employed (Business activity) Male 0-14 0

1878 rows × 6 columns

In [1677]:
t_014m_2009 = df_014m_2009.loc[:,"Total"]

s9_9 = np.sum(t_014m_2009)
s9_9
Out[1677]:
4503
In [1678]:
df_014fm_2009 = df_age_d014_2009.loc[(df_age_d014_2009["Gender"]=="Female")]
df_014fm_2009
Out[1678]:
State Year Type Gender Age_group Total
2518 A & N ISLANDS 2009 Others Female 0-14 0
2625 A & N ISLANDS 2009 Unemployment Female 0-14 0
2738 A & N ISLANDS 2009 Failure in Examination Female 0-14 0
2753 A & N ISLANDS 2009 Service (Private) Female 0-14 0
2846 A & N ISLANDS 2009 By Jumping from (Other sites) Female 0-14 0
... ... ... ... ... ... ...
235888 TRIPURA 2009 Unemployed Female 0-14 0
236069 UTTAR PRADESH 2009 Not having Children(Barrenness/Impotency Female 0-14 1
236077 UTTAR PRADESH 2009 House Wife Female 0-14 7
236517 WEST BENGAL 2009 Death of Dear Person Female 0-14 7
236527 WEST BENGAL 2009 By touching electric wires Female 0-14 0

1875 rows × 6 columns

In [1679]:
t_014fm_2009 = df_014fm_2009.loc[:,"Total"]

s9_10 = np.sum(t_014fm_2009)
s9_10
Out[1679]:
4348
In [1680]:
df_1529m_2009 = df_age_d1529_2009.loc[(df_age_d1529_2009["Gender"]=="Male")]
df_1529m_2009
Out[1680]:
State Year Type Gender Age_group Total
2620 A & N ISLANDS 2009 Dowry Dispute Male 15-29 0
2746 A & N ISLANDS 2009 By Jumping off Moving Vehicles/Trains Male 15-29 0
2844 A & N ISLANDS 2009 By Fire-Arms Male 15-29 0
2854 A & N ISLANDS 2009 Student Male 15-29 2
3003 A & N ISLANDS 2009 Unemployment Male 15-29 0
... ... ... ... ... ... ...
236299 UTTARAKHAND 2009 By Overdose of sleeping pills Male 15-29 0
236301 UTTARAKHAND 2009 By Self Infliction of injury Male 15-29 0
236519 WEST BENGAL 2009 Family Problems Male 15-29 535
236526 WEST BENGAL 2009 By Jumping off Moving Vehicles/Trains Male 15-29 16
236529 WEST BENGAL 2009 House Wife Male 15-29 0

1883 rows × 6 columns

In [1681]:
t_1529m_2009 = df_1529m_2009.loc[:,"Total"]

s9_11 = np.sum(t_1529m_2009)
s9_11
Out[1681]:
71231
In [1682]:
df_1529fm_2009 = df_age_d1529_2009.loc[(df_age_d1529_2009["Gender"]=="Female")]
df_1529fm_2009
Out[1682]:
State Year Type Gender Age_group Total
2622 A & N ISLANDS 2009 Not having Children(Barrenness/Impotency Female 15-29 0
2623 A & N ISLANDS 2009 Professional/Career Problem Female 15-29 0
2632 A & N ISLANDS 2009 By Jumping off Moving Vehicles/Trains Female 15-29 0
2704 A & N ISLANDS 2009 Property Dispute Female 15-29 0
2745 A & N ISLANDS 2009 By Hanging Female 15-29 14
... ... ... ... ... ... ...
235878 TRIPURA 2009 Fall in Social Reputation Female 15-29 0
235884 TRIPURA 2009 By Jumping from (Other sites) Female 15-29 0
236078 UTTAR PRADESH 2009 Student Female 15-29 107
236287 UTTARAKHAND 2009 Failure in Examination Female 15-29 3
236297 UTTARAKHAND 2009 By Over Alcoholism Female 15-29 0

1881 rows × 6 columns

In [1683]:
t_1529fm_2009 = df_1529fm_2009.loc[:,"Total"]

s9_12 = np.sum(t_1529fm_2009)
s9_12
Out[1683]:
60514
In [1684]:
df_3044m_2009 = df_age_d3044_2009.loc[(df_age_d3044_2009["Gender"]=="Male")]
df_3044m_2009
Out[1684]:
State Year Type Gender Age_group Total
2516 A & N ISLANDS 2009 By Fire-Arms Male 30-44 0
2619 A & N ISLANDS 2009 Bankruptcy or Sudden change in Economic Male 30-44 0
2703 A & N ISLANDS 2009 Paralysis Male 30-44 0
2740 A & N ISLANDS 2009 Insanity/Mental Illness Male 30-44 5
2742 A & N ISLANDS 2009 Other Prolonged Illness Male 30-44 3
... ... ... ... ... ... ...
236516 WEST BENGAL 2009 Causes Not known Male 30-44 1240
236522 WEST BENGAL 2009 By Drowning Male 30-44 103
236525 WEST BENGAL 2009 By Jumping from (Other sites) Male 30-44 158
236531 WEST BENGAL 2009 Service (Government) Male 30-44 94
236533 WEST BENGAL 2009 Service (Private) Male 30-44 241

1886 rows × 6 columns

In [1685]:
t_3044m_2009 = df_3044m_2009.loc[:,"Total"]

s9_13 = np.sum(t_3044m_2009)
s9_13
Out[1685]:
88004
In [1686]:
df_3044fm_2009 = df_age_d3044_2009.loc[(df_age_d3044_2009["Gender"]=="Female")]
df_3044fm_2009
Out[1686]:
State Year Type Gender Age_group Total
2519 A & N ISLANDS 2009 Others Female 30-44 1
2707 A & N ISLANDS 2009 Professional Activity Female 30-44 0
2708 A & N ISLANDS 2009 Unemployed Female 30-44 0
2749 A & N ISLANDS 2009 By Self Infliction of injury Female 30-44 0
3011 A & N ISLANDS 2009 Service (Government) Female 30-44 1
... ... ... ... ... ... ...
236304 UTTARAKHAND 2009 Retired Person Female 30-44 8
236520 WEST BENGAL 2009 Not having Children(Barrenness/Impotency Female 30-44 14
236523 WEST BENGAL 2009 By Fire/Self Immolation Female 30-44 92
236524 WEST BENGAL 2009 By Hanging Female 30-44 823
236528 WEST BENGAL 2009 Farming/Agriculture Activity Female 30-44 52

1880 rows × 6 columns

In [1687]:
t_3044fm_2009 = df_3044fm_2009.loc[:,"Total"]

s9_14 = np.sum(t_3044fm_2009)
s9_14
Out[1687]:
42448
In [1688]:
df_4559m_2009 = df_age_d4559_2009.loc[(df_age_d4559_2009["Gender"]=="Male")]
df_4559m_2009
Out[1688]:
State Year Type Gender Age_group Total
2512 A & N ISLANDS 2009 Failure in Examination Male 45-59 0
2517 A & N ISLANDS 2009 By touching electric wires Male 45-59 0
2621 A & N ISLANDS 2009 Fall in Social Reputation Male 45-59 0
2627 A & N ISLANDS 2009 Unemployment Male 45-59 0
2633 A & N ISLANDS 2009 By Over Alcoholism Male 45-59 0
... ... ... ... ... ... ...
236072 UTTAR PRADESH 2009 Poverty Male 45-59 6
236073 UTTAR PRADESH 2009 Suspected/Illicit Relation Male 45-59 5
236076 UTTAR PRADESH 2009 By Machine Male 45-59 1
236293 UTTARAKHAND 2009 By Consuming Insecticides Male 45-59 7
236518 WEST BENGAL 2009 Fall in Social Reputation Male 45-59 12

1883 rows × 6 columns

In [1689]:
t_4559m_2009 = df_4559m_2009.loc[:,"Total"]

s9_15 = np.sum(t_4559m_2009)
s9_15
Out[1689]:
58787
In [1690]:
df_4559fm_2009 = df_age_d4559_2009.loc[(df_age_d4559_2009["Gender"]=="Female")]
df_4559fm_2009
Out[1690]:
State Year Type Gender Age_group Total
2513 A & N ISLANDS 2009 Family Problems Female 45-59 0
2514 A & N ISLANDS 2009 Not having Children(Barrenness/Impotency Female 45-59 0
2631 A & N ISLANDS 2009 By Fire/Self Immolation Female 45-59 1
2739 A & N ISLANDS 2009 Fall in Social Reputation Female 45-59 0
2750 A & N ISLANDS 2009 By Self Infliction of injury Female 45-59 0
... ... ... ... ... ... ...
236066 UTTAR PRADESH 2009 Family Problems Female 45-59 45
236283 UTTARAKHAND 2009 Cancellation/Non-Settlement of Marriage Female 45-59 0
236290 UTTARAKHAND 2009 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
236291 UTTARAKHAND 2009 Property Dispute Female 45-59 0
236305 UTTARAKHAND 2009 Retired Person Female 45-59 6

1878 rows × 6 columns

In [1691]:
t_4559fm_2009 = df_4559fm_2009.loc[:,"Total"]

s9_16 = np.sum(t_4559fm_2009)
s9_16
Out[1691]:
21021
In [1692]:
df_60m_2009 = df_age_d60_2009.loc[(df_age_d60_2009["Gender"]=="Male")]
df_60m_2009
Out[1692]:
State Year Type Gender Age_group Total
2624 A & N ISLANDS 2009 Suspected/Illicit Relation Male 60+ 0
2634 A & N ISLANDS 2009 Professional Activity Male 60+ 0
2741 A & N ISLANDS 2009 Not having Children(Barrenness/Impotency Male 60+ 0
2748 A & N ISLANDS 2009 By Over Alcoholism Male 60+ 0
2834 A & N ISLANDS 2009 Dowry Dispute Male 60+ 0
... ... ... ... ... ... ...
236289 UTTARAKHAND 2009 Illness (Aids/STD) Male 60+ 0
236294 UTTARAKHAND 2009 By Consuming Insecticides Male 60+ 3
236300 UTTARAKHAND 2009 By Overdose of sleeping pills Male 60+ 0
236302 UTTARAKHAND 2009 By Self Infliction of injury Male 60+ 0
236532 WEST BENGAL 2009 Service (Government) Male 60+ 0

1877 rows × 6 columns

In [1693]:
t_60m_2009 = df_60m_2009.loc[:,"Total"]

s9_17 = np.sum(t_60m_2009)
s9_17
Out[1693]:
21632
In [1694]:
df_60fm_2009 = df_age_d60_2009.loc[(df_age_d60_2009["Gender"]=="Female")]
df_60fm_2009
Out[1694]:
State Year Type Gender Age_group Total
2626 A & N ISLANDS 2009 Unemployment Female 60+ 0
2629 A & N ISLANDS 2009 By Consuming Other Poison Female 60+ 0
2737 A & N ISLANDS 2009 Divorce Female 60+ 0
2743 A & N ISLANDS 2009 Suspected/Illicit Relation Female 60+ 0
2841 A & N ISLANDS 2009 Poverty Female 60+ 0
... ... ... ... ... ... ...
235885 TRIPURA 2009 By Jumping from (Other sites) Female 60+ 0
236068 UTTAR PRADESH 2009 Insanity/Mental Illness Female 60+ 6
236288 UTTARAKHAND 2009 Fall in Social Reputation Female 60+ 0
236298 UTTARAKHAND 2009 By Over Alcoholism Female 60+ 0
236521 WEST BENGAL 2009 Professional/Career Problem Female 60+ 0

1877 rows × 6 columns

In [1695]:
t_60fm_2009 = df_60fm_2009.loc[:,"Total"]

s9_18 = np.sum(t_60fm_2009)
s9_18
Out[1695]:
8639
In [1696]:
df_0100fm_2009 = df_age_d0100_2009.loc[(df_age_d0100_2009["Gender"]=="Female")]
df_0100fm_2009
Out[1696]:
State Year Type Gender Age_group Total
2705 A & N ISLANDS 2009 Matriculate/Secondary Female 0-100+ 13
2855 A & N ISLANDS 2009 Married Female 0-100+ 28
3012 A & N ISLANDS 2009 Never Married Female 0-100+ 17
3248 A & N ISLANDS 2009 Middle Female 0-100+ 27
3337 A & N ISLANDS 2009 Diploma Female 0-100+ 0
... ... ... ... ... ... ...
232551 JHARKHAND 2009 Married Female 0-100+ 215
232904 KERALA 2009 No Education Female 0-100+ 61
233347 MADHYA PRADESH 2009 Diploma Female 0-100+ 45
233362 MADHYA PRADESH 2009 Widowed/Widower Female 0-100+ 200
236075 UTTAR PRADESH 2009 Post Graduate and Above Female 0-100+ 15

455 rows × 6 columns

In [1697]:
t_0100fm_2009 = df_0100fm_2009.loc[:,"Total"]

s9_55 = np.sum(t_0100fm_2009)
s9_55
Out[1697]:
91360
In [1698]:
df_0100m_2009 = df_age_d0100_2009.loc[(df_age_d0100_2009["Gender"]=="Male")]
df_0100m_2009
Out[1698]:
State Year Type Gender Age_group Total
2515 A & N ISLANDS 2009 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 4
2842 A & N ISLANDS 2009 Middle Male 0-100+ 43
3639 A & N ISLANDS 2009 No Education Male 0-100+ 2
4061 A & N ISLANDS 2009 Graduate Male 0-100+ 0
4130 A & N ISLANDS 2009 Divorcee Male 0-100+ 0
... ... ... ... ... ... ...
234826 PUDUCHERRY 2009 Widowed/Widower Male 0-100+ 0
235000 PUNJAB 2009 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 39
235463 SIKKIM 2009 Married Male 0-100+ 28
236074 UTTAR PRADESH 2009 No Education Male 0-100+ 479
236292 UTTARAKHAND 2009 Post Graduate and Above Male 0-100+ 0

455 rows × 6 columns

In [1699]:
t_0100m_2009 = df_0100m_2009.loc[:,"Total"]

s9_56 = np.sum(t_0100m_2009)
s9_56
Out[1699]:
162942
In [1700]:
df_st_AN_2009 = df_2009.loc[(df_2009["State"]=="A & N ISLANDS")]

df_st_AN_2009
Out[1700]:
State Year Type Gender Age_group Total
2510 A & N ISLANDS 2009 Cancellation/Non-Settlement of Marriage Male 0-14 0
2511 A & N ISLANDS 2009 Causes Not known Male 0-14 0
2512 A & N ISLANDS 2009 Failure in Examination Male 45-59 0
2513 A & N ISLANDS 2009 Family Problems Female 45-59 0
2514 A & N ISLANDS 2009 Not having Children(Barrenness/Impotency Female 45-59 0
... ... ... ... ... ... ...
8020 A & N ISLANDS 2009 Farming/Agriculture Activity Male 45-59 5
8021 A & N ISLANDS 2009 House Wife Female 15-29 14
8022 A & N ISLANDS 2009 Others Male 0-14 0
8023 A & N ISLANDS 2009 Service (Government) Male 30-44 3
8024 A & N ISLANDS 2009 Married Male 0-100+ 66

561 rows × 6 columns

In [1701]:
t_AN_2009 = df_st_AN_2009.loc[:,"Total"]

s9_19 = np.sum(t_AN_2009)
s9_19
Out[1701]:
655
In [1702]:
df_st_AP_2009 = df_2009.loc[(df_2009["State"]=="ANDHRA PRADESH")]

df_st_AP_2009
Out[1702]:
State Year Type Gender Age_group Total
7547 ANDHRA PRADESH 2009 Cancellation/Non-Settlement of Marriage Female 30-44 4
7548 ANDHRA PRADESH 2009 Fall in Social Reputation Female 15-29 21
7549 ANDHRA PRADESH 2009 Other Prolonged Illness Male 60+ 248
7550 ANDHRA PRADESH 2009 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
7551 ANDHRA PRADESH 2009 Professional/Career Problem Female 30-44 3
... ... ... ... ... ... ...
229479 ANDHRA PRADESH 2009 By touching electric wires Male 0-14 2
229480 ANDHRA PRADESH 2009 Others Male 15-29 541
229481 ANDHRA PRADESH 2009 Public Sector Undertaking Male 30-44 203
229482 ANDHRA PRADESH 2009 Retired Person Male 30-44 0
229483 ANDHRA PRADESH 2009 Service (Government) Female 45-59 2

566 rows × 6 columns

In [1703]:
t_AP_2009 = df_st_AP_2009.loc[:,"Total"]

s9_20 = np.sum(t_AP_2009)
s9_20
Out[1703]:
72500
In [1704]:
df_st_ARP_2009 = df_2009.loc[(df_2009["State"]=="ARUNACHAL PRADESH")]

df_st_ARP_2009
Out[1704]:
State Year Type Gender Age_group Total
14114 ARUNACHAL PRADESH 2009 Cancellation/Non-Settlement of Marriage Female 60+ 0
14115 ARUNACHAL PRADESH 2009 Causes Not known Female 60+ 0
14116 ARUNACHAL PRADESH 2009 Death of Dear Person Female 0-14 0
14117 ARUNACHAL PRADESH 2009 Dowry Dispute Female 45-59 0
14118 ARUNACHAL PRADESH 2009 Love Affairs Male 15-29 3
... ... ... ... ... ... ...
229683 ARUNACHAL PRADESH 2009 Middle Female 0-100+ 10
229684 ARUNACHAL PRADESH 2009 By Consuming Insecticides Female 45-59 0
229685 ARUNACHAL PRADESH 2009 By Fire-Arms Female 30-44 0
229686 ARUNACHAL PRADESH 2009 Service (Government) Female 15-29 0
229687 ARUNACHAL PRADESH 2009 Service (Government) Female 60+ 0

560 rows × 6 columns

In [1705]:
t_ARP_2009 = df_st_ARP_2009.loc[:,"Total"]

s9_21 = np.sum(t_ARP_2009)
s9_21
Out[1705]:
549
In [1706]:
df_st_AS_2009 = df_2009.loc[(df_2009["State"]=="ASSAM")]

df_st_AS_2009
Out[1706]:
State Year Type Gender Age_group Total
19412 ASSAM 2009 Divorce Female 30-44 2
19413 ASSAM 2009 Ideological Causes/Hero Worshipping Female 30-44 0
19414 ASSAM 2009 Ideological Causes/Hero Worshipping Male 45-59 0
19415 ASSAM 2009 Professional/Career Problem Male 0-14 0
19416 ASSAM 2009 Property Dispute Male 30-44 71
... ... ... ... ... ... ...
229861 ASSAM 2009 By Fire-Arms Female 45-59 0
229862 ASSAM 2009 By Jumping off Moving Vehicles/Trains Female 0-14 0
229863 ASSAM 2009 Farming/Agriculture Activity Female 60+ 0
229864 ASSAM 2009 Others Male 30-44 220
229865 ASSAM 2009 Service (Private) Female 30-44 2

566 rows × 6 columns

In [1707]:
t_AS_2009 = df_st_AS_2009.loc[:,"Total"]

s9_22 = np.sum(t_AS_2009)
s9_22
Out[1707]:
14830
In [1708]:
df_st_BH_2009 = df_2009.loc[(df_2009["State"]=="BIHAR")]

df_st_BH_2009
Out[1708]:
State Year Type Gender Age_group Total
24669 BIHAR 2009 Bankruptcy or Sudden change in Economic Female 30-44 0
24670 BIHAR 2009 Cancer Female 30-44 0
24671 BIHAR 2009 Cancer Male 60+ 0
24672 BIHAR 2009 Ideological Causes/Hero Worshipping Male 60+ 0
24673 BIHAR 2009 Illness (Aids/STD) Female 60+ 0
... ... ... ... ... ... ...
230120 BIHAR 2009 Service (Government) Male 30-44 1
230121 BIHAR 2009 Unemployed Female 30-44 6
230122 BIHAR 2009 Divorcee Male 0-100+ 5
230123 BIHAR 2009 Never Married Female 0-100+ 112
230124 BIHAR 2009 Never Married Male 0-100+ 155

566 rows × 6 columns

In [1709]:
t_BH_2009 = df_st_BH_2009.loc[:,"Total"]

s9_23 = np.sum(t_BH_2009)
s9_23
Out[1709]:
5255
In [1710]:
df_st_CH_2009 = df_2009.loc[(df_2009["State"]=="CHANDIGARH")]

df_st_CH_2009
Out[1710]:
State Year Type Gender Age_group Total
33132 CHANDIGARH 2009 Bankruptcy or Sudden change in Economic Female 45-59 0
33133 CHANDIGARH 2009 Dowry Dispute Male 15-29 0
33134 CHANDIGARH 2009 Fall in Social Reputation Female 15-29 0
33135 CHANDIGARH 2009 Family Problems Female 45-59 0
33136 CHANDIGARH 2009 Family Problems Female 60+ 1
... ... ... ... ... ... ...
230339 CHANDIGARH 2009 By Self Infliction of injury Female 45-59 0
230340 CHANDIGARH 2009 House Wife Female 45-59 1
230341 CHANDIGARH 2009 Retired Person Female 0-14 0
230342 CHANDIGARH 2009 Retired Person Male 45-59 0
230343 CHANDIGARH 2009 Student Female 60+ 0

557 rows × 6 columns

In [1711]:
t_CH_2009 = df_st_CH_2009.loc[:,"Total"]

s9_24 = np.sum(t_CH_2009)
s9_24
Out[1711]:
374
In [1712]:
df_st_CT_2009 = df_2009.loc[(df_2009["State"]=="CHHATTISGARH")]

df_st_CT_2009
Out[1712]:
State Year Type Gender Age_group Total
38195 CHHATTISGARH 2009 Death of Dear Person Female 15-29 13
38196 CHHATTISGARH 2009 Paralysis Female 45-59 0
38197 CHHATTISGARH 2009 Unemployment Female 0-14 0
38198 CHHATTISGARH 2009 Graduate Female 0-100+ 6
38199 CHHATTISGARH 2009 By coming under running vehicles/trains Male 0-14 1
... ... ... ... ... ... ...
230546 CHHATTISGARH 2009 By Jumping from (Other sites) Male 45-59 4
230547 CHHATTISGARH 2009 By Over Alcoholism Male 0-14 0
230548 CHHATTISGARH 2009 Others Female 60+ 8
230549 CHHATTISGARH 2009 Student Male 30-44 11
230550 CHHATTISGARH 2009 Student Male 45-59 0

566 rows × 6 columns

In [1713]:
t_CT_2009 = df_st_CT_2009.loc[:,"Total"]

s9_25 = np.sum(t_CT_2009)
s9_25
Out[1713]:
29415
In [1714]:
df_st_DN_2009 = df_2009.loc[(df_2009["State"]=="D & N HAVELI")]

df_st_DN_2009
Out[1714]:
State Year Type Gender Age_group Total
45369 D & N HAVELI 2009 Cancer Female 15-29 0
45370 D & N HAVELI 2009 Causes Not known Female 15-29 1
45371 D & N HAVELI 2009 Causes Not known Female 60+ 1
45372 D & N HAVELI 2009 Drug Abuse/Addiction Female 30-44 0
45373 D & N HAVELI 2009 Failure in Examination Female 30-44 0
... ... ... ... ... ... ...
230770 D & N HAVELI 2009 By Overdose of sleeping pills Female 15-29 0
230771 D & N HAVELI 2009 By Overdose of sleeping pills Female 60+ 0
230772 D & N HAVELI 2009 By Self Infliction of injury Female 15-29 0
230773 D & N HAVELI 2009 By Self Infliction of injury Female 60+ 0
230774 D & N HAVELI 2009 Retired Person Male 60+ 0

558 rows × 6 columns

In [1715]:
t_DN_2009 = df_st_DN_2009.loc[:,"Total"]

s9_26 = np.sum(t_DN_2009)
s9_26
Out[1715]:
280
In [1716]:
df_st_DD_2009 = df_2009.loc[(df_2009["State"]=="DAMAN & DIU")]

df_st_DD_2009
Out[1716]:
State Year Type Gender Age_group Total
50606 DAMAN & DIU 2009 Death of Dear Person Male 30-44 0
50607 DAMAN & DIU 2009 Divorce Male 15-29 0
50608 DAMAN & DIU 2009 Drug Abuse/Addiction Female 45-59 0
50609 DAMAN & DIU 2009 Fall in Social Reputation Male 15-29 0
50610 DAMAN & DIU 2009 Family Problems Female 15-29 0
... ... ... ... ... ... ...
230959 DAMAN & DIU 2009 Student Female 0-14 1
230960 DAMAN & DIU 2009 Student Male 30-44 0
230961 DAMAN & DIU 2009 Student Male 45-59 1
230962 DAMAN & DIU 2009 Unemployed Male 30-44 0
230963 DAMAN & DIU 2009 Married Male 0-100+ 6

561 rows × 6 columns

In [1717]:
t_DD_2009 = df_st_DD_2009.loc[:,"Total"]

s9_27 = np.sum(t_DD_2009)
s9_27
Out[1717]:
115
In [1718]:
df_st_DL_2009 = df_2009.loc[(df_2009["State"]=="DELHI (UT)")]

df_st_DL_2009
Out[1718]:
State Year Type Gender Age_group Total
55846 DELHI (UT) 2009 Cancer Male 15-29 0
55847 DELHI (UT) 2009 Cancer Male 60+ 0
55848 DELHI (UT) 2009 Drug Abuse/Addiction Male 0-14 0
55849 DELHI (UT) 2009 Drug Abuse/Addiction Male 15-29 15
55850 DELHI (UT) 2009 Failure in Examination Male 15-29 21
... ... ... ... ... ... ...
231201 DELHI (UT) 2009 Others Female 30-44 7
231202 DELHI (UT) 2009 Professional Activity Male 15-29 3
231203 DELHI (UT) 2009 Public Sector Undertaking Male 45-59 4
231204 DELHI (UT) 2009 Self-employed (Business activity) Male 0-14 0
231205 DELHI (UT) 2009 Service (Government) Male 60+ 0

566 rows × 6 columns

In [1719]:
t_DL_2009 = df_st_DL_2009.loc[:,"Total"]

s9_28 = np.sum(t_DL_2009)
s9_28
Out[1719]:
7385
In [1720]:
df_st_GOA_2009 = df_2009.loc[(df_2009["State"]=="GOA")]

df_st_GOA_2009
Out[1720]:
State Year Type Gender Age_group Total
60676 GOA 2009 Cancellation/Non-Settlement of Marriage Female 60+ 0
60677 GOA 2009 Cancer Female 60+ 0
60678 GOA 2009 Causes Not known Female 60+ 0
60679 GOA 2009 Divorce Female 30-44 0
60680 GOA 2009 Others Female 15-29 3
... ... ... ... ... ... ...
231439 GOA 2009 By Self Infliction of injury Male 15-29 0
231440 GOA 2009 By Self Infliction of injury Male 60+ 0
231441 GOA 2009 Others Female 45-59 0
231442 GOA 2009 Public Sector Undertaking Male 45-59 2
231443 GOA 2009 Retired Person Female 45-59 0

560 rows × 6 columns

In [1721]:
t_GOA_2009 = df_st_GOA_2009.loc[:,"Total"]

s9_29 = np.sum(t_GOA_2009)
s9_29
Out[1721]:
1382
In [1722]:
df_st_GJ_2009 = df_2009.loc[(df_2009["State"]=="GUJARAT")]

df_st_GJ_2009
Out[1722]:
State Year Type Gender Age_group Total
67450 GUJARAT 2009 Failure in Examination Female 30-44 0
67451 GUJARAT 2009 Family Problems Female 60+ 39
67452 GUJARAT 2009 Ideological Causes/Hero Worshipping Male 60+ 0
67453 GUJARAT 2009 Insanity/Mental Illness Male 30-44 135
68479 GUJARAT 2009 Dowry Dispute Female 45-59 1
... ... ... ... ... ... ...
231656 GUJARAT 2009 House Wife Female 45-59 262
231657 GUJARAT 2009 House Wife Male 15-29 0
231658 GUJARAT 2009 Public Sector Undertaking Female 60+ 0
231659 GUJARAT 2009 Retired Person Female 45-59 2
231660 GUJARAT 2009 Self-employed (Business activity) Male 60+ 15

565 rows × 6 columns

In [1723]:
t_GJ_2009 = df_st_GJ_2009.loc[:,"Total"]

s9_30 = np.sum(t_GJ_2009)
s9_30
Out[1723]:
30779
In [1724]:
df_st_HR_2009 = df_2009.loc[(df_2009["State"]=="HARYANA")]

df_st_HR_2009
Out[1724]:
State Year Type Gender Age_group Total
74633 HARYANA 2009 Cancellation/Non-Settlement of Marriage Female 60+ 0
74634 HARYANA 2009 Cancellation/Non-Settlement of Marriage Male 45-59 0
74635 HARYANA 2009 Causes Not known Male 15-29 150
74636 HARYANA 2009 Family Problems Male 0-14 5
74637 HARYANA 2009 Ideological Causes/Hero Worshipping Male 45-59 0
... ... ... ... ... ... ...
231841 HARYANA 2009 Farming/Agriculture Activity Male 30-44 107
231842 HARYANA 2009 House Wife Male 0-14 0
231843 HARYANA 2009 Others Female 30-44 16
231844 HARYANA 2009 Professional Activity Female 15-29 0
231845 HARYANA 2009 Service (Private) Female 15-29 16

566 rows × 6 columns

In [1725]:
t_HR_2009 = df_st_HR_2009.loc[:,"Total"]

s9_31 = np.sum(t_HR_2009)
s9_31
Out[1725]:
12515
In [1726]:
df_st_HP_2009 = df_2009.loc[(df_2009["State"]=="HIMACHAL PRADESH")]

df_st_HP_2009
Out[1726]:
State Year Type Gender Age_group Total
81231 HIMACHAL PRADESH 2009 Fall in Social Reputation Female 60+ 0
81232 HIMACHAL PRADESH 2009 Family Problems Male 0-14 0
81233 HIMACHAL PRADESH 2009 Family Problems Male 15-29 12
81234 HIMACHAL PRADESH 2009 Other Prolonged Illness Female 45-59 3
81235 HIMACHAL PRADESH 2009 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
... ... ... ... ... ... ...
232091 HIMACHAL PRADESH 2009 Farming/Agriculture Activity Male 0-14 0
232092 HIMACHAL PRADESH 2009 Others Female 15-29 15
232093 HIMACHAL PRADESH 2009 Retired Person Female 0-14 0
232094 HIMACHAL PRADESH 2009 Retired Person Female 15-29 0
232095 HIMACHAL PRADESH 2009 Student Female 60+ 0

566 rows × 6 columns

In [1727]:
t_HP_2009 = df_st_HP_2009.loc[:,"Total"]

s9_32 = np.sum(t_HP_2009)
s9_32
Out[1727]:
2800
In [1728]:
df_st_JK_2009 = df_2009.loc[(df_2009["State"]=="JAMMU & KASHMIR")]

df_st_JK_2009
Out[1728]:
State Year Type Gender Age_group Total
87017 JAMMU & KASHMIR 2009 Divorce Male 0-14 0
87018 JAMMU & KASHMIR 2009 Drug Abuse/Addiction Female 15-29 0
87019 JAMMU & KASHMIR 2009 Fall in Social Reputation Male 0-14 0
87020 JAMMU & KASHMIR 2009 Ideological Causes/Hero Worshipping Female 15-29 0
88421 JAMMU & KASHMIR 2009 Bankruptcy or Sudden change in Economic Female 15-29 0
... ... ... ... ... ... ...
232308 JAMMU & KASHMIR 2009 By Jumping from (Other sites) Male 15-29 1
232309 JAMMU & KASHMIR 2009 By Overdose of sleeping pills Female 15-29 0
232310 JAMMU & KASHMIR 2009 By Self Infliction of injury Female 15-29 3
232311 JAMMU & KASHMIR 2009 Retired Person Male 60+ 0
232312 JAMMU & KASHMIR 2009 Married Male 0-100+ 97

564 rows × 6 columns

In [1729]:
t_JK_2009 = df_st_JK_2009.loc[:,"Total"]

s9_33 = np.sum(t_JK_2009)
s9_33
Out[1729]:
1602
In [1730]:
df_st_JH_2009 = df_2009.loc[(df_2009["State"]=="JHARKHAND")]

df_st_JH_2009
Out[1730]:
State Year Type Gender Age_group Total
94180 JHARKHAND 2009 Death of Dear Person Male 0-14 0
94181 JHARKHAND 2009 Divorce Male 30-44 2
94182 JHARKHAND 2009 Dowry Dispute Female 15-29 9
94183 JHARKHAND 2009 Failure in Examination Male 30-44 3
94184 JHARKHAND 2009 Illegitimate Pregnancy Male 60+ 0
... ... ... ... ... ... ...
232547 JHARKHAND 2009 By Over Alcoholism Female 15-29 0
232548 JHARKHAND 2009 By touching electric wires Female 60+ 0
232549 JHARKHAND 2009 Service (Private) Male 60+ 1
232550 JHARKHAND 2009 Unemployed Female 0-14 0
232551 JHARKHAND 2009 Married Female 0-100+ 215

565 rows × 6 columns

In [1731]:
t_JH_2009 = df_st_JH_2009.loc[:,"Total"]

s9_34 = np.sum(t_JH_2009)
s9_34
Out[1731]:
5550
In [1732]:
df_st_KN_2009 = df_2009.loc[(df_2009["State"]=="KARNATAKA")]

df_st_KN_2009
Out[1732]:
State Year Type Gender Age_group Total
98913 KARNATAKA 2009 Cancellation/Non-Settlement of Marriage Female 60+ 1
98914 KARNATAKA 2009 Cancellation/Non-Settlement of Marriage Male 0-14 2
98915 KARNATAKA 2009 Dowry Dispute Female 45-59 9
98916 KARNATAKA 2009 Failure in Examination Female 15-29 56
98917 KARNATAKA 2009 Illness (Aids/STD) Female 45-59 4
... ... ... ... ... ... ...
232702 KARNATAKA 2009 Illegitimate Pregnancy Male 45-59 0
232703 KARNATAKA 2009 Not having Children(Barrenness/Impotency Male 15-29 7
232704 KARNATAKA 2009 Suspected/Illicit Relation Female 45-59 4
232705 KARNATAKA 2009 By Over Alcoholism Female 15-29 6
232706 KARNATAKA 2009 By Self Infliction of injury Male 15-29 9

566 rows × 6 columns

In [1733]:
t_KN_2009 = df_st_KN_2009.loc[:,"Total"]

s9_35 = np.sum(t_KN_2009)
s9_35
Out[1733]:
60975
In [1734]:
df_st_KER_2009 = df_2009.loc[(df_2009["State"]=="KERALA")]

df_st_KER_2009
Out[1734]:
State Year Type Gender Age_group Total
103767 KERALA 2009 Bankruptcy or Sudden change in Economic Male 15-29 35
103768 KERALA 2009 Dowry Dispute Male 15-29 0
103769 KERALA 2009 Dowry Dispute Male 30-44 0
103832 KERALA 2009 Cancellation/Non-Settlement of Marriage Male 30-44 14
103833 KERALA 2009 Ideological Causes/Hero Worshipping Male 45-59 0
... ... ... ... ... ... ...
232911 KERALA 2009 Others Male 15-29 290
232912 KERALA 2009 Others Male 45-59 479
232913 KERALA 2009 Student Male 30-44 0
232914 KERALA 2009 Student Male 60+ 0
232915 KERALA 2009 Divorcee Male 0-100+ 38

565 rows × 6 columns

In [1735]:
t_KER_2009 = df_st_KER_2009.loc[:,"Total"]

s9_36 = np.sum(t_KER_2009)
s9_36
Out[1735]:
43775
In [1736]:
df_st_LD_2009 = df_2009.loc[(df_2009["State"]=="LAKSHADWEEP")]

df_st_LD_2009
Out[1736]:
State Year Type Gender Age_group Total
110306 LAKSHADWEEP 2009 Death of Dear Person Male 15-29 0
110307 LAKSHADWEEP 2009 Illegitimate Pregnancy Female 60+ 0
110308 LAKSHADWEEP 2009 Insanity/Mental Illness Male 45-59 0
110309 LAKSHADWEEP 2009 Not having Children(Barrenness/Impotency Female 0-14 0
110310 LAKSHADWEEP 2009 Professional/Career Problem Female 60+ 0
... ... ... ... ... ... ...
233135 LAKSHADWEEP 2009 Retired Person Female 0-14 0
233136 LAKSHADWEEP 2009 Retired Person Male 45-59 0
233137 LAKSHADWEEP 2009 Student Female 15-29 0
233138 LAKSHADWEEP 2009 Student Female 60+ 0
233139 LAKSHADWEEP 2009 Unemployed Female 15-29 0

556 rows × 6 columns

In [1737]:
t_LD_2009 = df_st_LD_2009.loc[:,"Total"]

s9_37 = np.sum(t_LD_2009)
s9_37
Out[1737]:
5
In [1738]:
df_st_MP_2009 = df_2009.loc[(df_2009["State"]=="MADHYA PRADESH")]

df_st_MP_2009
Out[1738]:
State Year Type Gender Age_group Total
116332 MADHYA PRADESH 2009 Cancellation/Non-Settlement of Marriage Male 60+ 0
116333 MADHYA PRADESH 2009 Dowry Dispute Male 60+ 0
116334 MADHYA PRADESH 2009 Failure in Examination Female 15-29 59
116335 MADHYA PRADESH 2009 Failure in Examination Female 30-44 0
116336 MADHYA PRADESH 2009 Ideological Causes/Hero Worshipping Male 60+ 0
... ... ... ... ... ... ...
233358 MADHYA PRADESH 2009 By touching electric wires Male 45-59 19
233359 MADHYA PRADESH 2009 Others Female 45-59 18
233360 MADHYA PRADESH 2009 Service (Government) Male 15-29 13
233361 MADHYA PRADESH 2009 Unemployed Male 45-59 34
233362 MADHYA PRADESH 2009 Widowed/Widower Female 0-100+ 200

566 rows × 6 columns

In [1739]:
t_MP_2009 = df_st_MP_2009.loc[:,"Total"]

s9_38 = np.sum(t_MP_2009)
s9_38
Out[1739]:
45565
In [1740]:
df_st_MH_2009 = df_2009.loc[(df_2009["State"]=="MAHARASHTRA")]

df_st_MH_2009
Out[1740]:
State Year Type Gender Age_group Total
123229 MAHARASHTRA 2009 Bankruptcy or Sudden change in Economic Female 0-14 0
123230 MAHARASHTRA 2009 Death of Dear Person Female 15-29 20
123231 MAHARASHTRA 2009 Divorce Male 30-44 6
123232 MAHARASHTRA 2009 Dowry Dispute Female 15-29 181
123233 MAHARASHTRA 2009 Fall in Social Reputation Male 15-29 10
... ... ... ... ... ... ...
233580 MAHARASHTRA 2009 Others Female 15-29 16
233581 MAHARASHTRA 2009 Others Female 60+ 16
233582 MAHARASHTRA 2009 Professional Activity Male 0-14 0
233583 MAHARASHTRA 2009 Self-employed (Business activity) Male 15-29 112
233584 MAHARASHTRA 2009 Seperated Male 0-100+ 31

566 rows × 6 columns

In [1741]:
t_MH_2009 = df_st_MH_2009.loc[:,"Total"]

s9_39 = np.sum(t_MH_2009)
s9_39
Out[1741]:
71500
In [1742]:
df_st_MN_2009 = df_2009.loc[(df_2009["State"]=="MANIPUR")]

df_st_MN_2009
Out[1742]:
State Year Type Gender Age_group Total
127659 MANIPUR 2009 Divorce Male 0-14 0
127660 MANIPUR 2009 Illegitimate Pregnancy Male 0-14 0
127661 MANIPUR 2009 Illness (Aids/STD) Male 60+ 0
127662 MANIPUR 2009 Others Female 45-59 0
127663 MANIPUR 2009 Suspected/Illicit Relation Female 30-44 0
... ... ... ... ... ... ...
233789 MANIPUR 2009 Paralysis Female 30-44 0
233790 MANIPUR 2009 By coming under running vehicles/trains Female 45-59 0
233791 MANIPUR 2009 By Jumping from (Building) Male 0-14 0
233792 MANIPUR 2009 Farming/Agriculture Activity Female 45-59 0
233793 MANIPUR 2009 Others Female 15-29 1

557 rows × 6 columns

In [1743]:
t_MN_2009 = df_st_MN_2009.loc[:,"Total"]

s9_40 = np.sum(t_MN_2009)
s9_40
Out[1743]:
134
In [1744]:
df_st_MG_2009 = df_2009.loc[(df_2009["State"]=="MEGHALAYA")]

df_st_MG_2009
Out[1744]:
State Year Type Gender Age_group Total
132938 MEGHALAYA 2009 Bankruptcy or Sudden change in Economic Female 45-59 0
132939 MEGHALAYA 2009 Death of Dear Person Male 45-59 0
132940 MEGHALAYA 2009 Other Prolonged Illness Female 15-29 0
132941 MEGHALAYA 2009 Physical Abuse (Rape/Incest Etc.) Female 15-29 0
132942 MEGHALAYA 2009 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
... ... ... ... ... ... ...
233984 MEGHALAYA 2009 By Overdose of sleeping pills Female 30-44 0
233985 MEGHALAYA 2009 By Self Infliction of injury Female 30-44 0
233986 MEGHALAYA 2009 Farming/Agriculture Activity Female 45-59 0
233987 MEGHALAYA 2009 Others Female 0-14 1
233988 MEGHALAYA 2009 Service (Private) Male 15-29 0

564 rows × 6 columns

In [1745]:
t_MG_2009 = df_st_MG_2009.loc[:,"Total"]

s9_41 = np.sum(t_MG_2009)
s9_41
Out[1745]:
557
In [1746]:
df_st_MZ_2009 = df_2009.loc[(df_2009["State"]=="MIZORAM")]

df_st_MZ_2009
Out[1746]:
State Year Type Gender Age_group Total
140165 MIZORAM 2009 Cancer Female 30-44 0
140166 MIZORAM 2009 Causes Not known Male 45-59 1
140167 MIZORAM 2009 Dowry Dispute Male 0-14 0
140168 MIZORAM 2009 Failure in Examination Male 60+ 0
140169 MIZORAM 2009 Family Problems Male 60+ 0
... ... ... ... ... ... ...
234205 MIZORAM 2009 By Jumping from (Building) Female 60+ 0
234206 MIZORAM 2009 By Jumping from (Other sites) Female 45-59 0
234207 MIZORAM 2009 House Wife Male 15-29 0
234208 MIZORAM 2009 Professional Activity Female 15-29 0
234209 MIZORAM 2009 Public Sector Undertaking Female 15-29 0

559 rows × 6 columns

In [1747]:
t_MN_2009 = df_st_MN_2009.loc[:,"Total"]

s9_42 = np.sum(t_MN_2009)
s9_42
Out[1747]:
134
In [1748]:
df_st_NG_2009 = df_2009.loc[(df_2009["State"]=="NAGALAND")]

df_st_NG_2009
Out[1748]:
State Year Type Gender Age_group Total
144620 NAGALAND 2009 Death of Dear Person Male 15-29 0
144621 NAGALAND 2009 Death of Dear Person Male 60+ 0
144622 NAGALAND 2009 Drug Abuse/Addiction Male 0-14 0
144623 NAGALAND 2009 Family Problems Male 60+ 0
144624 NAGALAND 2009 Insanity/Mental Illness Male 45-59 0
... ... ... ... ... ... ...
234393 NAGALAND 2009 Farming/Agriculture Activity Female 60+ 0
234394 NAGALAND 2009 Others Male 30-44 1
234395 NAGALAND 2009 Professional Activity Female 45-59 0
234396 NAGALAND 2009 Public Sector Undertaking Female 45-59 0
234397 NAGALAND 2009 Student Male 15-29 2

560 rows × 6 columns

In [1749]:
t_NG_2009 = df_st_NG_2009.loc[:,"Total"]

s9_43 = np.sum(t_NG_2009)
s9_43
Out[1749]:
153
In [1750]:
df_st_OD_2009 = df_2009.loc[(df_2009["State"]=="ODISHA")]

df_st_OD_2009
Out[1750]:
State Year Type Gender Age_group Total
149169 ODISHA 2009 Bankruptcy or Sudden change in Economic Male 60+ 0
149170 ODISHA 2009 Cancellation/Non-Settlement of Marriage Female 30-44 17
149171 ODISHA 2009 Dowry Dispute Female 0-14 0
149172 ODISHA 2009 Ideological Causes/Hero Worshipping Male 45-59 0
149173 ODISHA 2009 Other Prolonged Illness Female 0-14 0
... ... ... ... ... ... ...
234588 ODISHA 2009 By touching electric wires Female 45-59 0
234589 ODISHA 2009 House Wife Male 0-14 0
234590 ODISHA 2009 Public Sector Undertaking Female 60+ 0
234591 ODISHA 2009 Public Sector Undertaking Male 15-29 52
234592 ODISHA 2009 Self-employed (Business activity) Female 0-14 0

566 rows × 6 columns

In [1751]:
t_OD_2009 = df_st_OD_2009.loc[:,"Total"]

s9_44 = np.sum(t_OD_2009)
s9_44
Out[1751]:
21825
In [1752]:
df_st_PD_2009 = df_2009.loc[(df_2009["State"]=="PUDUCHERRY")]

df_st_PD_2009
Out[1752]:
State Year Type Gender Age_group Total
155566 PUDUCHERRY 2009 Fall in Social Reputation Female 30-44 0
155567 PUDUCHERRY 2009 Illegitimate Pregnancy Male 45-59 0
155568 PUDUCHERRY 2009 Love Affairs Male 0-14 0
155569 PUDUCHERRY 2009 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
155570 PUDUCHERRY 2009 Professional/Career Problem Female 0-14 0
... ... ... ... ... ... ...
234822 PUDUCHERRY 2009 Others Male 0-14 0
234823 PUDUCHERRY 2009 By Over Alcoholism Male 30-44 0
234824 PUDUCHERRY 2009 Self-employed (Business activity) Male 60+ 1
234825 PUDUCHERRY 2009 Student Female 30-44 0
234826 PUDUCHERRY 2009 Widowed/Widower Male 0-100+ 0

558 rows × 6 columns

In [1753]:
t_PD_2009 = df_st_PD_2009.loc[:,"Total"]

s9_45 = np.sum(t_PD_2009)
s9_45
Out[1753]:
2590
In [1754]:
df_st_PB_2009 = df_2009.loc[(df_2009["State"]=="PUNJAB")]

df_st_PB_2009
Out[1754]:
State Year Type Gender Age_group Total
160041 PUNJAB 2009 Bankruptcy or Sudden change in Economic Male 0-14 0
160042 PUNJAB 2009 Drug Abuse/Addiction Male 60+ 0
160043 PUNJAB 2009 Family Problems Male 45-59 21
160044 PUNJAB 2009 Illness (Aids/STD) Male 45-59 0
160045 PUNJAB 2009 Insanity/Mental Illness Female 0-14 0
... ... ... ... ... ... ...
235007 PUNJAB 2009 By Self Infliction of injury Male 0-14 0
235008 PUNJAB 2009 By touching electric wires Female 60+ 0
235009 PUNJAB 2009 Self-employed (Business activity) Male 60+ 3
235010 PUNJAB 2009 Service (Private) Male 45-59 5
235011 PUNJAB 2009 Student Female 45-59 0

566 rows × 6 columns

In [1755]:
t_PB_2009 = df_st_PB_2009.loc[:,"Total"]

s9_46 = np.sum(t_PB_2009)
s9_46
Out[1755]:
4235
In [1756]:
df_st_RJ_2009 = df_2009.loc[(df_2009["State"]=="RAJASTHAN")]

df_st_RJ_2009
Out[1756]:
State Year Type Gender Age_group Total
167034 RAJASTHAN 2009 Divorce Female 0-14 0
167035 RAJASTHAN 2009 Failure in Examination Female 30-44 1
167036 RAJASTHAN 2009 Love Affairs Female 60+ 0
167037 RAJASTHAN 2009 Not having Children(Barrenness/Impotency Male 45-59 0
167038 RAJASTHAN 2009 Others Female 30-44 178
... ... ... ... ... ... ...
235210 RAJASTHAN 2009 By Drowning Female 45-59 12
235211 RAJASTHAN 2009 By Fire-Arms Male 60+ 0
235212 RAJASTHAN 2009 By Overdose of sleeping pills Female 45-59 2
235213 RAJASTHAN 2009 Others Female 60+ 4
235214 RAJASTHAN 2009 Student Male 30-44 1

566 rows × 6 columns

In [1757]:
t_RJ_2009 = df_st_RJ_2009.loc[:,"Total"]

s9_47 = np.sum(t_RJ_2009)
s9_47
Out[1757]:
25325
In [1758]:
df_st_SM_2009 = df_2009.loc[(df_2009["State"]=="SIKKIM")]

df_st_SM_2009
Out[1758]:
State Year Type Gender Age_group Total
171549 SIKKIM 2009 Dowry Dispute Male 15-29 0
171550 SIKKIM 2009 Failure in Examination Male 15-29 5
171551 SIKKIM 2009 Fall in Social Reputation Male 45-59 0
171552 SIKKIM 2009 Ideological Causes/Hero Worshipping Female 30-44 0
171788 SIKKIM 2009 Cancer Female 60+ 0
... ... ... ... ... ... ...
235459 SIKKIM 2009 By Jumping from (Building) Female 60+ 0
235460 SIKKIM 2009 By Jumping off Moving Vehicles/Trains Male 15-29 0
235461 SIKKIM 2009 Service (Government) Male 0-14 0
235462 SIKKIM 2009 Unemployed Male 45-59 5
235463 SIKKIM 2009 Married Male 0-100+ 28

563 rows × 6 columns

In [1759]:
t_SM_2009 = df_st_SM_2009.loc[:,"Total"]

s9_48 = np.sum(t_SM_2009)
s9_48
Out[1759]:
1204
In [1760]:
df_st_TN_2009 = df_2009.loc[(df_2009["State"]=="TAMIL NADU")]

df_st_TN_2009
Out[1760]:
State Year Type Gender Age_group Total
177155 TAMIL NADU 2009 Bankruptcy or Sudden change in Economic Female 45-59 8
177156 TAMIL NADU 2009 Bankruptcy or Sudden change in Economic Male 45-59 45
177157 TAMIL NADU 2009 Divorce Male 0-14 0
177158 TAMIL NADU 2009 Drug Abuse/Addiction Male 45-59 76
177159 TAMIL NADU 2009 Failure in Examination Male 30-44 7
... ... ... ... ... ... ...
235672 TAMIL NADU 2009 By Jumping off Moving Vehicles/Trains Female 30-44 27
235673 TAMIL NADU 2009 By touching electric wires Female 0-14 0
235674 TAMIL NADU 2009 By touching electric wires Female 15-29 6
235675 TAMIL NADU 2009 Farming/Agriculture Activity Male 0-14 5
235676 TAMIL NADU 2009 Others Male 30-44 645

564 rows × 6 columns

In [1761]:
t_TN_2009 = df_st_TN_2009.loc[:,"Total"]

s9_49 = np.sum(t_TN_2009)
s9_49
Out[1761]:
71832
In [1762]:
df_st_TP_2009 = df_2009.loc[(df_2009["State"]=="TRIPURA")]

df_st_TP_2009
Out[1762]:
State Year Type Gender Age_group Total
183430 TRIPURA 2009 Cancellation/Non-Settlement of Marriage Male 45-59 0
183431 TRIPURA 2009 Divorce Male 15-29 0
183432 TRIPURA 2009 Drug Abuse/Addiction Female 60+ 0
183433 TRIPURA 2009 Family Problems Male 0-14 2
183434 TRIPURA 2009 Illness (Aids/STD) Female 45-59 0
... ... ... ... ... ... ...
235885 TRIPURA 2009 By Jumping from (Other sites) Female 60+ 0
235886 TRIPURA 2009 By Machine Female 45-59 0
235887 TRIPURA 2009 Farming/Agriculture Activity Male 15-29 11
235888 TRIPURA 2009 Unemployed Female 0-14 0
235889 TRIPURA 2009 Unemployed Male 45-59 0

565 rows × 6 columns

In [1763]:
t_TP_2009 = df_st_TP_2009.loc[:,"Total"]

s9_50 = np.sum(t_TP_2009)
s9_50
Out[1763]:
3689
In [1764]:
df_st_UP_2009 = df_2009.loc[(df_2009["State"]=="UTTAR PRADESH")]

df_st_UP_2009
Out[1764]:
State Year Type Gender Age_group Total
187801 UTTAR PRADESH 2009 Fall in Social Reputation Female 45-59 1
187802 UTTAR PRADESH 2009 Illegitimate Pregnancy Female 0-14 0
187803 UTTAR PRADESH 2009 Illegitimate Pregnancy Female 15-29 9
187804 UTTAR PRADESH 2009 Illness (Aids/STD) Female 60+ 0
187805 UTTAR PRADESH 2009 Professional/Career Problem Male 0-14 0
... ... ... ... ... ... ...
236074 UTTAR PRADESH 2009 No Education Male 0-100+ 479
236075 UTTAR PRADESH 2009 Post Graduate and Above Female 0-100+ 15
236076 UTTAR PRADESH 2009 By Machine Male 45-59 1
236077 UTTAR PRADESH 2009 House Wife Female 0-14 7
236078 UTTAR PRADESH 2009 Student Female 15-29 107

566 rows × 6 columns

In [1765]:
t_UP_2009 = df_st_UP_2009.loc[:,"Total"]

s9_51 = np.sum(t_UP_2009)
s9_51
Out[1765]:
20790
In [1766]:
df_st_UK_2009 = df_2009.loc[(df_2009["State"]=="UTTARAKHAND")]

df_st_UK_2009
Out[1766]:
State Year Type Gender Age_group Total
192762 UTTARAKHAND 2009 Cancer Male 45-59 0
192763 UTTARAKHAND 2009 Death of Dear Person Female 60+ 0
192764 UTTARAKHAND 2009 Dowry Dispute Male 15-29 0
192765 UTTARAKHAND 2009 Dowry Dispute Male 30-44 0
192766 UTTARAKHAND 2009 Ideological Causes/Hero Worshipping Male 15-29 0
... ... ... ... ... ... ...
236301 UTTARAKHAND 2009 By Self Infliction of injury Male 15-29 0
236302 UTTARAKHAND 2009 By Self Infliction of injury Male 60+ 0
236303 UTTARAKHAND 2009 By touching electric wires Female 30-44 0
236304 UTTARAKHAND 2009 Retired Person Female 30-44 8
236305 UTTARAKHAND 2009 Retired Person Female 45-59 6

556 rows × 6 columns

In [1767]:
t_UK_2009 = df_st_UK_2009.loc[:,"Total"]

s9_52 = np.sum(t_UK_2009)
s9_52
Out[1767]:
1710
In [1768]:
df_st_WB_2009 = df_2009.loc[(df_2009["State"]=="WEST BENGAL")]

df_st_WB_2009
Out[1768]:
State Year Type Gender Age_group Total
198440 WEST BENGAL 2009 Death of Dear Person Male 45-59 2
198441 WEST BENGAL 2009 Family Problems Female 45-59 245
198442 WEST BENGAL 2009 Love Affairs Male 30-44 86
198443 WEST BENGAL 2009 Other Prolonged Illness Female 60+ 25
198444 WEST BENGAL 2009 Physical Abuse (Rape/Incest Etc.) Female 15-29 2
... ... ... ... ... ... ...
236529 WEST BENGAL 2009 House Wife Male 15-29 0
236530 WEST BENGAL 2009 Self-employed (Business activity) Male 0-14 0
236531 WEST BENGAL 2009 Service (Government) Male 30-44 94
236532 WEST BENGAL 2009 Service (Government) Male 60+ 0
236533 WEST BENGAL 2009 Service (Private) Male 30-44 241

566 rows × 6 columns

In [1769]:
t_WB_2009 = df_st_WB_2009.loc[:,"Total"]

s9_53 = np.sum(t_WB_2009)
s9_53
Out[1769]:
73240
In [1770]:
t_ANm_2009 = np.sum(df_st_AN_2009.where(df_st_AN_2009["Gender"]=="Male")["Total"])
t_ANm_2009
Out[1770]:
430.0
In [1771]:
t_ANfm_2009 = np.sum(df_st_AN_2009.where(df_st_AN_2009["Gender"]=="Female")["Total"])
t_ANfm_2009
Out[1771]:
225.0
In [1772]:
t_APm_2009 = np.sum(df_st_AP_2009.where(df_st_AP_2009["Gender"]=="Male")["Total"])
t_APm_2009
Out[1772]:
49435.0
In [1773]:
t_APfm_2009 = np.sum(df_st_AP_2009.where(df_st_AP_2009["Gender"]=="Female")["Total"])
t_APfm_2009
Out[1773]:
23065.0
In [1774]:
t_ARPm_2009 = np.sum(df_st_ARP_2009.where(df_st_ARP_2009["Gender"]=="Male")["Total"])
t_ARPm_2009
Out[1774]:
384.0
In [1775]:
t_ARPfm_2009 = np.sum(df_st_ARP_2009.where(df_st_ARP_2009["Gender"]=="Female")["Total"])
t_ARPfm_2009
Out[1775]:
165.0
In [1776]:
t_ASm_2009 = np.sum(df_st_AS_2009.where(df_st_AS_2009["Gender"]=="Male")["Total"])
t_ASm_2009
Out[1776]:
9410.0
In [1777]:
t_ASfm_2009 = np.sum(df_st_AS_2009.where(df_st_AS_2009["Gender"]=="Female")["Total"])
t_ASfm_2009
Out[1777]:
5420.0
In [1778]:
t_BHm_2009 = np.sum(df_st_BH_2009.where(df_st_BH_2009["Gender"]=="Male")["Total"])
t_BHm_2009
Out[1778]:
2570.0
In [1779]:
t_BHfm_2009 = np.sum(df_st_BH_2009.where(df_st_BH_2009["Gender"]=="Female")["Total"])
t_BHfm_2009
Out[1779]:
2685.0
In [1780]:
t_CHm_2009 = np.sum(df_st_CH_2009.where(df_st_CH_2009["Gender"]=="Male")["Total"])
t_CHm_2009
Out[1780]:
219.0
In [1781]:
t_CHfm_2009 = np.sum(df_st_CH_2009.where(df_st_CH_2009["Gender"]=="Female")["Total"])
t_CHfm_2009
Out[1781]:
155.0
In [1782]:
t_CTm_2009 = np.sum(df_st_CT_2009.where(df_st_CT_2009["Gender"]=="Male")["Total"])
t_CTm_2009
Out[1782]:
19770.0
In [1783]:
t_CTfm_2009 = np.sum(df_st_CT_2009.where(df_st_CT_2009["Gender"]=="Female")["Total"])
t_CTfm_2009
Out[1783]:
9645.0
In [1784]:
t_DNm_2009 = np.sum(df_st_DN_2009.where(df_st_DN_2009["Gender"]=="Male")["Total"])
t_DNm_2009
Out[1784]:
150.0
In [1785]:
t_DNfm_2009 = np.sum(df_st_DN_2009.where(df_st_DN_2009["Gender"]=="Female")["Total"])
t_DNfm_2009
Out[1785]:
130.0
In [1786]:
t_DDm_2009 = np.sum(df_st_DD_2009.where(df_st_DD_2009["Gender"]=="Male")["Total"])
t_DDm_2009
Out[1786]:
75.0
In [1787]:
t_DDfm_2009 = np.sum(df_st_DD_2009.where(df_st_DD_2009["Gender"]=="Female")["Total"])
t_DDfm_2009
Out[1787]:
40.0
In [1788]:
t_DLm_2009 = np.sum(df_st_DL_2009.where(df_st_DL_2009["Gender"]=="Male")["Total"])
t_DLm_2009
Out[1788]:
4665.0
In [1789]:
t_DLfm_2009 = np.sum(df_st_DL_2009.where(df_st_DL_2009["Gender"]=="Female")["Total"])
t_DLfm_2009
Out[1789]:
2720.0
In [1790]:
t_GOAm_2009 = np.sum(df_st_GOA_2009.where(df_st_GOA_2009["Gender"]=="Male")["Total"])
t_GOAm_2009
Out[1790]:
915.0
In [1791]:
t_GOAfm_2009 = np.sum(df_st_GOA_2009.where(df_st_GOA_2009["Gender"]=="Female")["Total"])
t_GOAfm_2009
Out[1791]:
467.0
In [1792]:
t_GJm_2009 = np.sum(df_st_GJ_2009.where(df_st_GJ_2009["Gender"]=="Male")["Total"])
t_GJm_2009
Out[1792]:
18355.0
In [1793]:
t_GJfm_2009 = np.sum(df_st_GJ_2009.where(df_st_GJ_2009["Gender"]=="Female")["Total"])
t_GJfm_2009
Out[1793]:
12424.0
In [1794]:
t_HRm_2009 = np.sum(df_st_HR_2009.where(df_st_HR_2009["Gender"]=="Male")["Total"])
t_HRm_2009
Out[1794]:
9075.0
In [1795]:
t_HRfm_2009 = np.sum(df_st_HR_2009.where(df_st_HR_2009["Gender"]=="Female")["Total"])
t_HRfm_2009
Out[1795]:
3440.0
In [1796]:
t_HPm_2009 = np.sum(df_st_HP_2009.where(df_st_HP_2009["Gender"]=="Male")["Total"])
t_HPm_2009
Out[1796]:
1830.0
In [1797]:
t_HPfm_2009 = np.sum(df_st_HP_2009.where(df_st_HP_2009["Gender"]=="Female")["Total"])
t_HPfm_2009
Out[1797]:
970.0
In [1798]:
t_JKm_2009 = np.sum(df_st_JK_2009.where(df_st_JK_2009["Gender"]=="Male")["Total"])
t_JKm_2009
Out[1798]:
837.0
In [1799]:
t_JKfm_2009 = np.sum(df_st_JK_2009.where(df_st_JK_2009["Gender"]=="Female")["Total"])
t_JKfm_2009
Out[1799]:
765.0
In [1800]:
t_JHm_2009 = np.sum(df_st_JH_2009.where(df_st_JH_2009["Gender"]=="Male")["Total"])
t_JHm_2009
Out[1800]:
3720.0
In [1801]:
t_JHfm_2009 = np.sum(df_st_JH_2009.where(df_st_JH_2009["Gender"]=="Female")["Total"])
t_JHfm_2009
Out[1801]:
1830.0
In [1802]:
t_KNm_2009 = np.sum(df_st_KN_2009.where(df_st_KN_2009["Gender"]=="Male")["Total"])
t_KNm_2009
Out[1802]:
41045.0
In [1803]:
t_KNfm_2009 = np.sum(df_st_KN_2009.where(df_st_KN_2009["Gender"]=="Female")["Total"])
t_KNfm_2009
Out[1803]:
19930.0
In [1804]:
t_KERm_2009 = np.sum(df_st_KER_2009.where(df_st_KER_2009["Gender"]=="Male")["Total"])
t_KERm_2009
Out[1804]:
31610.0
In [1805]:
t_KERfm_2009 = np.sum(df_st_KER_2009.where(df_st_KER_2009["Gender"]=="Female")["Total"])
t_KERfm_2009
Out[1805]:
12165.0
In [1806]:
t_LDm_2009 = np.sum(df_st_LD_2009.where(df_st_LD_2009["Gender"]=="Male")["Total"])
t_LDm_2009
Out[1806]:
0.0
In [1807]:
t_LDfm_2009 = np.sum(df_st_LD_2009.where(df_st_LD_2009["Gender"]=="Female")["Total"])
t_LDfm_2009
Out[1807]:
5.0
In [1808]:
t_MPm_2009 = np.sum(df_st_MP_2009.where(df_st_MP_2009["Gender"]=="Male")["Total"])
t_MPm_2009
Out[1808]:
25500.0
In [1809]:
t_MPfm_2009 = np.sum(df_st_MP_2009.where(df_st_MP_2009["Gender"]=="Female")["Total"])
t_MPfm_2009
Out[1809]:
20065.0
In [1810]:
t_MHm_2009 = np.sum(df_st_MH_2009.where(df_st_MH_2009["Gender"]=="Male")["Total"])
t_MHm_2009
Out[1810]:
48925.0
In [1811]:
t_MHfm_2009 = np.sum(df_st_MH_2009.where(df_st_MH_2009["Gender"]=="Female")["Total"])
t_MHfm_2009
Out[1811]:
22575.0
In [1812]:
t_MNm_2009 = np.sum(df_st_MN_2009.where(df_st_MN_2009["Gender"]=="Male")["Total"])
t_MNm_2009
Out[1812]:
90.0
In [1813]:
t_MNfm_2009 = np.sum(df_st_MN_2009.where(df_st_MN_2009["Gender"]=="Female")["Total"])
t_MNfm_2009
Out[1813]:
44.0
In [1814]:
t_MGm_2009 = np.sum(df_st_MG_2009.where(df_st_MG_2009["Gender"]=="Male")["Total"])
t_MGm_2009
Out[1814]:
335.0
In [1815]:
t_MGfm_2009 = np.sum(df_st_MG_2009.where(df_st_MG_2009["Gender"]=="Female")["Total"])
t_MGfm_2009
Out[1815]:
222.0
In [1816]:
t_MZm_2009 = np.sum(df_st_MZ_2009.where(df_st_MZ_2009["Gender"]=="Male")["Total"])
t_MZm_2009
Out[1816]:
304.0
In [1817]:
t_MZfm_2009 = np.sum(df_st_MZ_2009.where(df_st_MZ_2009["Gender"]=="Female")["Total"])
t_MZfm_2009
Out[1817]:
35.0
In [1818]:
t_NGm_2009 = np.sum(df_st_NG_2009.where(df_st_NG_2009["Gender"]=="Male")["Total"])
t_NGm_2009
Out[1818]:
124.0
In [1819]:
t_NGfm_2009 = np.sum(df_st_NG_2009.where(df_st_NG_2009["Gender"]=="Female")["Total"])
t_MGfm_2009
Out[1819]:
222.0
In [1820]:
t_ODm_2009 = np.sum(df_st_OD_2009.where(df_st_OD_2009["Gender"]=="Male")["Total"])
t_ODm_2009
Out[1820]:
12835.0
In [1821]:
t_ODfm_2009 = np.sum(df_st_OD_2009.where(df_st_OD_2009["Gender"]=="Female")["Total"])
t_ODfm_2009
Out[1821]:
8990.0
In [1822]:
t_PDm_2009 = np.sum(df_st_PD_2009.where(df_st_PD_2009["Gender"]=="Male")["Total"])
t_PDm_2009
Out[1822]:
1630.0
In [1823]:
t_PDfm_2009 = np.sum(df_st_PD_2009.where(df_st_PD_2009["Gender"]=="Female")["Total"])
t_PDfm_2009
Out[1823]:
960.0
In [1824]:
t_PBm_2009 = np.sum(df_st_PB_2009.where(df_st_PB_2009["Gender"]=="Male")["Total"])
t_PBm_2009
Out[1824]:
3175.0
In [1825]:
t_PBfm_2009 = np.sum(df_st_PB_2009.where(df_st_PB_2009["Gender"]=="Female")["Total"])
t_PBfm_2009
Out[1825]:
1060.0
In [1826]:
t_RJm_2009 = np.sum(df_st_RJ_2009.where(df_st_RJ_2009["Gender"]=="Male")["Total"])
t_RJm_2009
Out[1826]:
17555.0
In [1827]:
t_RJfm_2009 = np.sum(df_st_RJ_2009.where(df_st_RJ_2009["Gender"]=="Female")["Total"])
t_RJfm_2009
Out[1827]:
7770.0
In [1828]:
t_SMm_2009 = np.sum(df_st_SM_2009.where(df_st_SM_2009["Gender"]=="Male")["Total"])
t_SMm_2009
Out[1828]:
610.0
In [1829]:
t_SMfm_2009 = np.sum(df_st_SM_2009.where(df_st_SM_2009["Gender"]=="Female")["Total"])
t_SMfm_2009
Out[1829]:
594.0
In [1830]:
t_TNm_2009 = np.sum(df_st_TN_2009.where(df_st_TN_2009["Gender"]=="Male")["Total"])
t_TNm_2009
Out[1830]:
44511.0
In [1831]:
t_TNfm_2009 = np.sum(df_st_TN_2009.where(df_st_TN_2009["Gender"]=="Female")["Total"])
t_TNfm_2009
Out[1831]:
27321.0
In [1832]:
t_TPm_2009 = np.sum(df_st_TP_2009.where(df_st_TP_2009["Gender"]=="Male")["Total"])
t_TPm_2009
Out[1832]:
2335.0
In [1833]:
t_TPfm_2009 = np.sum(df_st_TP_2009.where(df_st_TP_2009["Gender"]=="Female")["Total"])
t_TPfm_2009
Out[1833]:
1354.0
In [1834]:
t_UPm_2009 = np.sum(df_st_UP_2009.where(df_st_UP_2009["Gender"]=="Male")["Total"])
t_UPm_2009
Out[1834]:
11195.0
In [1835]:
t_UPfm_2009 = np.sum(df_st_UP_2009.where(df_st_UP_2009["Gender"]=="Female")["Total"])
t_UPfm_2009
Out[1835]:
9595.0
In [1836]:
t_UKm_2009 = np.sum(df_st_UK_2009.where(df_st_UK_2009["Gender"]=="Male")["Total"])
t_UKm_2009
Out[1836]:
1010.0
In [1837]:
t_UKfm_2009 = np.sum(df_st_UK_2009.where(df_st_UK_2009["Gender"]=="Female")["Total"])
t_UKfm_2009
Out[1837]:
700.0
In [1838]:
t_WBm_2009 = np.sum(df_st_WB_2009.where(df_st_WB_2009["Gender"]=="Male")["Total"])
t_WBm_2009
Out[1838]:
42470.0
In [1839]:
t_WBfm_2009 = np.sum(df_st_WB_2009.where(df_st_WB_2009["Gender"]=="Female")["Total"])
t_WBfm_2009
Out[1839]:
30770.0
In [1840]:
l_2009=list(df_2009.loc[:,"Type"].unique())
l_2009.sort()
print(l_2009,end=" ")
['Bankruptcy or Sudden change in Economic', 'By Consuming Insecticides', 'By Consuming Other Poison', 'By Drowning', 'By Fire-Arms', 'By Fire/Self Immolation', 'By Hanging', 'By Jumping from (Building)', 'By Jumping from (Other sites)', 'By Jumping off Moving Vehicles/Trains', 'By Machine', 'By Over Alcoholism', 'By Overdose of sleeping pills', 'By Self Infliction of injury', 'By coming under running vehicles/trains', 'By touching electric wires', 'Cancellation/Non-Settlement of Marriage', 'Cancer', 'Causes Not known', 'Death of Dear Person', 'Diploma', 'Divorce', 'Divorcee', 'Dowry Dispute', 'Drug Abuse/Addiction', 'Failure in Examination', 'Fall in Social Reputation', 'Family Problems', 'Farming/Agriculture Activity', 'Graduate', 'House Wife', 'Hr. Secondary/Intermediate/Pre-Universit', 'Ideological Causes/Hero Worshipping', 'Illegitimate Pregnancy', 'Illness (Aids/STD)', 'Insanity/Mental Illness', 'Love Affairs', 'Married', 'Matriculate/Secondary', 'Middle', 'Never Married', 'No Education', 'Not having Children(Barrenness/Impotency', 'Other Prolonged Illness', 'Others', 'Paralysis', 'Physical Abuse (Rape/Incest Etc.)', 'Post Graduate and Above', 'Poverty', 'Primary', 'Professional Activity', 'Professional/Career Problem', 'Property Dispute', 'Public Sector Undertaking', 'Retired Person', 'Self-employed (Business activity)', 'Seperated', 'Service (Government)', 'Service (Private)', 'Student', 'Suspected/Illicit Relation', 'Unemployed', 'Unemployment', 'Widowed/Widower'] 
In [1841]:
cause_l_2009=[]
for i in l_2009:
    rough= np.sum(df_2009.where(df_2009["Type"]==i)["Total"])
    cause_l_2009.append(rough)

print(cause_l_2009,end=" ")
[3162.0, 25941.0, 16842.0, 7749.0, 560.0, 11650.0, 40006.0, 833.0, 1018.0, 960.0, 150.0, 1572.0, 622.0, 313.0, 3617.0, 1073.0, 1003.0, 841.0, 21313.0, 803.0, 1161.0, 331.0, 1248.0, 2921.0, 2942.0, 2010.0, 1123.0, 30082.0, 17368.0, 2886.0, 25092.0, 11194.0, 128.0, 141.0, 677.0, 8469.0, 3711.0, 89492.0, 23720.0, 30144.0, 27801.0, 27238.0, 680.0, 16028.0, 74646.0, 716.0, 320.0, 1009.0, 2987.0, 29799.0, 3634.0, 1354.0, 1283.0, 2914.0, 1031.0, 7748.0, 3088.0, 1714.0, 10720.0, 6761.0, 1180.0, 9916.0, 2472.0, 5522.0] 
In [1842]:
x1_2009 = set(df_2009.loc[:,"State"])
x1_2009
len(x1_2009)
Out[1842]:
35
In [1843]:
cause_df_2009 = pd.DataFrame(cause_l_2009,l_2009)
cause_df_2009.reset_index()
Out[1843]:
index 0
0 Bankruptcy or Sudden change in Economic 3162.0
1 By Consuming Insecticides 25941.0
2 By Consuming Other Poison 16842.0
3 By Drowning 7749.0
4 By Fire-Arms 560.0
... ... ...
59 Student 6761.0
60 Suspected/Illicit Relation 1180.0
61 Unemployed 9916.0
62 Unemployment 2472.0
63 Widowed/Widower 5522.0

64 rows × 2 columns

In [1844]:
cause_df_2009.plot.bar(stacked=True,figsize=(50,20))
plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("Causes",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths due to Different Causes in 2009",fontsize=55)
plt.legend(["Death Count"], prop={"size":30})
Out[1844]:
<matplotlib.legend.Legend at 0xf484f0>
In [1845]:
s_2009=list(df_2009.loc[:,"State"].unique())
s_2009.sort()
print(s_2009,end=" ")
['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH', 'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR', 'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA', 'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA', 'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'] 
In [1846]:
state_s_2009 = [s9_19,s9_20,s9_21,s9_22,s9_23,s9_24,s9_25,s9_26,s9_27,s9_28,s9_29,s9_30,s9_31,s9_32,s9_33,s9_34,
           s9_35,s9_36,s9_37,s9_38,s9_39,s9_40,s9_41,s9_42,s9_43,s9_44,s9_45,s9_46,s9_47,s9_48,s9_49,s9_50,
           s9_51,s9_52,s9_53]
print(state_s_2009,end=" ")
[655, 72500, 549, 14830, 5255, 374, 29415, 280, 115, 7385, 1382, 30779, 12515, 2800, 1602, 5550, 60975, 43775, 5, 45565, 71500, 134, 557, 134, 153, 21825, 2590, 4235, 25325, 1204, 71832, 3689, 20790, 1710, 73240] 
In [1847]:
state_m_2009=[t_ANm_2009, t_APm_2009, t_ARPm_2009, t_ASm_2009, t_BHm_2009, t_CHm_2009, t_CTm_2009, t_DNm_2009,
             t_DDm_2009, t_DLm_2009, t_GOAm_2009, t_GJm_2009, t_HRm_2009, t_HPm_2009,t_JKm_2009, t_JHm_2009,
             t_KNm_2009, t_KERm_2009, t_LDm_2009,t_MPm_2009,t_MHm_2009,t_MNm_2009,t_MGm_2009,t_MZm_2009,
             t_NGm_2009, t_ODm_2009, t_PDm_2009,t_PBm_2009,t_RJm_2009,t_SMm_2009,t_TNm_2009,t_TPm_2009,
             t_UPm_2009, t_UKm_2009, t_WBm_2009]
print(state_m_2009,end=" ")
[430.0, 49435.0, 384.0, 9410.0, 2570.0, 219.0, 19770.0, 150.0, 75.0, 4665.0, 915.0, 18355.0, 9075.0, 1830.0, 837.0, 3720.0, 41045.0, 31610.0, 0.0, 25500.0, 48925.0, 90.0, 335.0, 304.0, 124.0, 12835.0, 1630.0, 3175.0, 17555.0, 610.0, 44511.0, 2335.0, 11195.0, 1010.0, 42470.0] 
In [1848]:
state_fm_2009=[t_ANfm_2009, t_APfm_2009, t_ARPfm_2009, t_ASfm_2009, t_BHfm_2009, t_CHfm_2009, t_CTfm_2009, t_DNfm_2009,
             t_DDfm_2009, t_DLfm_2009, t_GOAfm_2009, t_GJfm_2009, t_HRfm_2009, t_HPfm_2009,t_JKfm_2009, t_JHfm_2009,
             t_KNfm_2009, t_KERfm_2009, t_LDfm_2009,t_MPfm_2009,t_MHfm_2009,t_MNfm_2009,t_MGfm_2009,t_MZfm_2009,
             t_NGfm_2009, t_ODfm_2009, t_PDfm_2009,t_PBfm_2009,t_RJfm_2009,t_SMfm_2009,t_TNfm_2009,t_TPfm_2009,
             t_UPfm_2009, t_UKfm_2009, t_WBfm_2009]
print(state_fm_2009,end=" ")
[225.0, 23065.0, 165.0, 5420.0, 2685.0, 155.0, 9645.0, 130.0, 40.0, 2720.0, 467.0, 12424.0, 3440.0, 970.0, 765.0, 1830.0, 19930.0, 12165.0, 5.0, 20065.0, 22575.0, 44.0, 222.0, 35.0, 29.0, 8990.0, 960.0, 1060.0, 7770.0, 594.0, 27321.0, 1354.0, 9595.0, 700.0, 30770.0] 
In [1849]:
df_state_2009 = {
    
    "State":['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH',
             'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR',
             'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA',
             'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA',
             'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'],
                   
    "Total":[s9_19,s9_20,s9_21,s9_22,s9_23,s9_24,s9_25,s9_26,s9_27,s9_28,s9_29,s9_30,s9_31,s9_32,s9_33,s9_34,
           s9_35,s9_36,s9_37,s9_38,s9_39,s9_40,s9_41,s9_42,s9_43,s9_44,s9_45,s9_46,s9_47,s9_48,s9_49,s9_50,
           s9_51,s9_52,s9_53],
       
    "Male":[t_ANm_2009, t_APm_2009, t_ARPm_2009, t_ASm_2009, t_BHm_2009, t_CHm_2009, t_CTm_2009, t_DNm_2009,
             t_DDm_2009, t_DLm_2009, t_GOAm_2009, t_GJm_2009, t_HRm_2009, t_HPm_2009,t_JKm_2009, t_JHm_2009,
             t_KNm_2009, t_KERm_2009, t_LDm_2009,t_MPm_2009,t_MHm_2009,t_MNm_2009,t_MGm_2009,t_MZm_2009,
             t_NGm_2009, t_ODm_2009, t_PDm_2009,t_PBm_2009,t_RJm_2009,t_SMm_2009,t_TNm_2009,t_TPm_2009,
             t_UPm_2009, t_UKm_2009, t_WBm_2009],
                 
    "Female":[t_ANfm_2009, t_APfm_2009, t_ARPfm_2009, t_ASfm_2009, t_BHfm_2009, t_CHfm_2009, t_CTfm_2009, t_DNfm_2009,
             t_DDfm_2009, t_DLfm_2009, t_GOAfm_2009, t_GJfm_2009, t_HRfm_2009, t_HPfm_2009,t_JKfm_2009, t_JHfm_2009,
             t_KNfm_2009, t_KERfm_2009, t_LDfm_2009,t_MPfm_2009,t_MHfm_2009,t_MNfm_2009,t_MGfm_2009,t_MZfm_2009,
             t_NGfm_2009, t_ODfm_2009, t_PDfm_2009,t_PBfm_2009,t_RJfm_2009,t_SMfm_2009,t_TNfm_2009,t_TPfm_2009,
             t_UPfm_2009, t_UKfm_2009, t_WBfm_2009]
                  

}

df_All_st_2009 = pd.DataFrame(df_state_2009)
df_All_st_2009
Out[1849]:
State Total Male Female
0 A & N ISLANDS 655 430.0 225.0
1 ANDHRA PRADESH 72500 49435.0 23065.0
2 ARUNACHAL PRADESH 549 384.0 165.0
3 ASSAM 14830 9410.0 5420.0
4 BIHAR 5255 2570.0 2685.0
5 CHANDIGARH 374 219.0 155.0
6 CHHATTISGARH 29415 19770.0 9645.0
7 D & N HAVELI 280 150.0 130.0
8 DAMAN & DIU 115 75.0 40.0
9 DELHI (UT) 7385 4665.0 2720.0
10 GOA 1382 915.0 467.0
11 GUJARAT 30779 18355.0 12424.0
12 HARYANA 12515 9075.0 3440.0
13 HIMACHAL PRADESH 2800 1830.0 970.0
14 JAMMU & KASHMIR 1602 837.0 765.0
15 JHARKHAND 5550 3720.0 1830.0
16 KARNATAKA 60975 41045.0 19930.0
17 KERALA 43775 31610.0 12165.0
18 LAKSHADWEEP 5 0.0 5.0
19 MADHYA PRADESH 45565 25500.0 20065.0
20 MAHARASHTRA 71500 48925.0 22575.0
21 MANIPUR 134 90.0 44.0
22 MEGHALAYA 557 335.0 222.0
23 MIZORAM 134 304.0 35.0
24 NAGALAND 153 124.0 29.0
25 ODISHA 21825 12835.0 8990.0
26 PUDUCHERRY 2590 1630.0 960.0
27 PUNJAB 4235 3175.0 1060.0
28 RAJASTHAN 25325 17555.0 7770.0
29 SIKKIM 1204 610.0 594.0
30 TAMIL NADU 71832 44511.0 27321.0
31 TRIPURA 3689 2335.0 1354.0
32 UTTAR PRADESH 20790 11195.0 9595.0
33 UTTARAKHAND 1710 1010.0 700.0
34 WEST BENGAL 73240 42470.0 30770.0
In [2482]:
pivot_2009 = pd.pivot_table(df_All_st_2009, values=None, index='State', columns=None,
                       fill_value=None, margins=False, dropna=True, margins_name='All', observed=False)

pivot_2009
Out[2482]:
Female Male Total
State
A & N ISLANDS 225.0 430.0 655
ANDHRA PRADESH 23065.0 49435.0 72500
ARUNACHAL PRADESH 165.0 384.0 549
ASSAM 5420.0 9410.0 14830
BIHAR 2685.0 2570.0 5255
CHANDIGARH 155.0 219.0 374
CHHATTISGARH 9645.0 19770.0 29415
D & N HAVELI 130.0 150.0 280
DAMAN & DIU 40.0 75.0 115
DELHI (UT) 2720.0 4665.0 7385
GOA 467.0 915.0 1382
GUJARAT 12424.0 18355.0 30779
HARYANA 3440.0 9075.0 12515
HIMACHAL PRADESH 970.0 1830.0 2800
JAMMU & KASHMIR 765.0 837.0 1602
JHARKHAND 1830.0 3720.0 5550
KARNATAKA 19930.0 41045.0 60975
KERALA 12165.0 31610.0 43775
LAKSHADWEEP 5.0 0.0 5
MADHYA PRADESH 20065.0 25500.0 45565
MAHARASHTRA 22575.0 48925.0 71500
MANIPUR 44.0 90.0 134
MEGHALAYA 222.0 335.0 557
MIZORAM 35.0 304.0 134
NAGALAND 29.0 124.0 153
ODISHA 8990.0 12835.0 21825
PUDUCHERRY 960.0 1630.0 2590
PUNJAB 1060.0 3175.0 4235
RAJASTHAN 7770.0 17555.0 25325
SIKKIM 594.0 610.0 1204
TAMIL NADU 27321.0 44511.0 71832
TRIPURA 1354.0 2335.0 3689
UTTAR PRADESH 9595.0 11195.0 20790
UTTARAKHAND 700.0 1010.0 1710
WEST BENGAL 30770.0 42470.0 73240
In [2483]:
pivot_2009.plot(kind='bar',figsize=(60,30))

plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("States",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths of Males And Females In Different State",fontsize=55)
plt.legend(["Female","Male","Total"], prop={"size":30})

plt.show
Out[2483]:
<function matplotlib.pyplot.show(close=None, block=None)>
In [2484]:
cause_l_percent_2009=[]
for i in cause_l_2009:
    p=i/np.sum(cause_l_2009)
    avg_2009_cause=p*100
    cause_l_percent_2009.append(avg_2009_cause)

print(cause_l_percent_2009,end=" ")
[0.49761657085213296, 4.082438793319159, 2.6504928166640176, 1.2194910839763373, 0.0881294369630596, 1.8334070368207933, 6.295904027043147, 0.13109253748255117, 0.16020672647927622, 0.15107903479381646, 0.02360609918653382, 0.24739191947487446, 0.09788662462682692, 0.04925806030256724, 0.5692217383846189, 0.16886229618100526, 0.1578461165606228, 0.13235152943916628, 3.354111946417302, 0.1263713176452444, 0.18271120770377178, 0.0520907922049513, 0.1964027452319614, 0.459689438159102, 0.46299429204521675, 0.3163217290995532, 0.1767309959098499, 4.73412450486207, 2.7332715378114627, 0.4541813483489108, 3.948828271923378, 1.7616444952937307, 0.020143871305842196, 0.022189733235341794, 0.106542194328556, 1.3328003600716998, 0.5840148938748467, 14.08371352267523, 3.7329111513638815, 4.743881692525838, 4.375154423232178, 4.2865528642853885, 0.10701431631228665, 2.522390385078427, 11.747339199186692, 0.11267978011705478, 0.05035967826460549, 0.15879036052808418, 0.47007612180117686, 4.689587664396809, 0.571897096292426, 0.213084388657112, 0.20191083504215263, 0.45858782019706373, 0.1622525884087758, 1.2193337099817605, 0.48597089525344295, 0.26973902670479316, 1.6870492218642836, 1.0640055773343677, 0.18570131360073275, 1.5605205302244625, 0.3890285145940774, 0.8690191980535984] 
In [2485]:
np.max(cause_l_percent_2009) #Married
Out[2485]:
14.08371352267523
In [2486]:
np.min(cause_l_percent_2009)  #Ideological Causes/Hero Worshipping
Out[2486]:
0.020143871305842196
In [2487]:
state_s_2009_percent=[]
tot=np.sum(state_s_2009)
for i in state_s_2009:
    xy=i/tot
    avg_state_2009=xy*100
    state_s_2009_percent.append(avg_state_2009)

print(state_s_2009_percent,end=" ")
[0.10311323249751268, 11.413296726823924, 0.0864262055589839, 2.3346095235696382, 0.8272672317166857, 0.05887686863216755, 4.6306499754417345, 0.04407893908290619, 0.018103849980479328, 1.1625820183116506, 0.21756104933062984, 4.845377378688463, 1.9701711522234675, 0.4407893908290618, 0.25219450146719896, 0.8737075425361762, 9.598976109215016, 6.891269851265065, 0.0007871239121947534, 7.173060211830787, 11.255871944384973, 0.02109492084681939, 0.08768560381849552, 0.02109492084681939, 0.024085991713159453, 3.435795876730098, 0.4077301865168822, 0.6666939536289561, 3.9867826152664256, 0.18953943805649662, 11.308136972154704, 0.5807400224172891, 3.272861226905784, 0.26919637797060564, 11.529791065828746] 
In [2488]:
np.max(state_s_2009_percent) #Maharashtra
Out[2488]:
11.529791065828746
In [2489]:
np.min(state_s_2009_percent)  #Lakshdweep
Out[2489]:
0.0007871239121947534
In [2490]:
l_age_grp_2009=[s9_4,s9_5,s9_6,s9_7,s9_8,s9_54]
l_age_grp_2009
Out[2490]:
[8851, 131745, 130452, 79808, 30271, 254302]
In [2491]:
l_age_grp_2009_percent=[]
for i in l_age_grp_2009:
    yz=i/s9_1
    avg_2009_age_grp=yz*100
    l_age_grp_2009_percent.append(avg_2009_age_grp)
l_age_grp_2009_percent
Out[2491]:
[1.3929172260000724,
 20.733236915532654,
 20.529752340544736,
 12.559703759192608,
 4.763868189837102,
 40.020521568892825]
In [2492]:
np.max(l_age_grp_2009_percent)  #0-100+
Out[2492]:
40.020521568892825
In [2493]:
np.min(l_age_grp_2009_percent)  #0-14
Out[2493]:
1.3929172260000724
In [2494]:
total_male_percent_2009= (s9_2/s9_1)*100
total_male_percent_2009
Out[2494]:
64.06679581825821
In [2495]:
total_female_percent_2009= (s9_3/s9_1)*100
total_female_percent_2009
Out[2495]:
35.933204181741786
In [ ]:
 

2010

In [2496]:
df_2010 = suicide_df.loc[(suicide_df["Year"]==2010)]

df_2010
Out[2496]:
State Year Type Gender Age_group Total
2521 A & N ISLANDS 2010 Death of Dear Person Female 15-29 0
2522 A & N ISLANDS 2010 Death of Dear Person Male 45-59 0
2523 A & N ISLANDS 2010 Divorce Female 30-44 0
2524 A & N ISLANDS 2010 Divorce Male 45-59 0
2525 A & N ISLANDS 2010 Dowry Dispute Female 45-59 0
... ... ... ... ... ... ...
236547 WEST BENGAL 2010 Retired Person Female 30-44 0
236548 WEST BENGAL 2010 Service (Private) Female 30-44 69
236549 WEST BENGAL 2010 Unemployed Female 60+ 1
236550 WEST BENGAL 2010 Unemployed Male 30-44 382
236551 WEST BENGAL 2010 Never Married Female 0-100+ 1766

19714 rows × 6 columns

In [2497]:
t2010_dcount = df_2010.loc[:,"Total"]

s10_1 = np.sum(t2010_dcount)

s10_1
Out[2497]:
672926
In [2498]:
male_2010 = df_2010.loc[(df_2010["Gender"]=="Male")]

male_2010
Out[2498]:
State Year Type Gender Age_group Total
2522 A & N ISLANDS 2010 Death of Dear Person Male 45-59 0
2524 A & N ISLANDS 2010 Divorce Male 45-59 0
2528 A & N ISLANDS 2010 Family Problems Male 45-59 0
2531 A & N ISLANDS 2010 Middle Male 0-100+ 29
2534 A & N ISLANDS 2010 By Jumping off Moving Vehicles/Trains Male 15-29 0
... ... ... ... ... ... ...
236541 WEST BENGAL 2010 By Hanging Male 0-14 64
236542 WEST BENGAL 2010 By Jumping from (Building) Male 45-59 31
236543 WEST BENGAL 2010 By Jumping off Moving Vehicles/Trains Male 0-14 0
236546 WEST BENGAL 2010 Professional Activity Male 60+ 11
236550 WEST BENGAL 2010 Unemployed Male 30-44 382

9870 rows × 6 columns

In [2499]:
m2010_count = male_2010.loc[:,"Total"]
s10_2 = np.sum(m2010_count)

s10_2
Out[2499]:
435897
In [2500]:
female_2010 = df_2010.loc[(df_2010["Gender"]=="Female")]

female_2010
Out[2500]:
State Year Type Gender Age_group Total
2521 A & N ISLANDS 2010 Death of Dear Person Female 15-29 0
2523 A & N ISLANDS 2010 Divorce Female 30-44 0
2525 A & N ISLANDS 2010 Dowry Dispute Female 45-59 0
2526 A & N ISLANDS 2010 Drug Abuse/Addiction Female 0-14 0
2527 A & N ISLANDS 2010 Failure in Examination Female 0-14 0
... ... ... ... ... ... ...
236545 WEST BENGAL 2010 Professional Activity Female 30-44 53
236547 WEST BENGAL 2010 Retired Person Female 30-44 0
236548 WEST BENGAL 2010 Service (Private) Female 30-44 69
236549 WEST BENGAL 2010 Unemployed Female 60+ 1
236551 WEST BENGAL 2010 Never Married Female 0-100+ 1766

9844 rows × 6 columns

In [2501]:
fm2010_count = female_2010.loc[:,"Total"]
s10_3 = np.sum(fm2010_count)
s10_3
Out[2501]:
237029
In [2502]:
df_age_d014_2010 = df_2010.loc[(df_2010["Age_group"]=="0-14")]

df_age_d014_2010
Out[2502]:
State Year Type Gender Age_group Total
2526 A & N ISLANDS 2010 Drug Abuse/Addiction Female 0-14 0
2527 A & N ISLANDS 2010 Failure in Examination Female 0-14 0
2530 A & N ISLANDS 2010 Professional/Career Problem Female 0-14 0
2533 A & N ISLANDS 2010 By Jumping from (Building) Female 0-14 0
2710 A & N ISLANDS 2010 Fall in Social Reputation Male 0-14 0
... ... ... ... ... ... ...
236090 UTTAR PRADESH 2010 By Over Alcoholism Male 0-14 0
236306 UTTARAKHAND 2010 Cancer Female 0-14 0
236540 WEST BENGAL 2010 Unemployment Male 0-14 0
236541 WEST BENGAL 2010 By Hanging Male 0-14 64
236543 WEST BENGAL 2010 By Jumping off Moving Vehicles/Trains Male 0-14 0

3752 rows × 6 columns

In [2503]:
t_014_2010 = df_age_d014_2010.loc[:,"Total"]

s10_4 = np.sum(t_014_2010)
s10_4
c:\program files\python\python38-32\lib\site-packages\IPython\core\displayhook.py:275: UserWarning: Output cache limit (currently 1000 entries) hit.
Flushing oldest 200 entries.
  warn('Output cache limit (currently {sz} entries) hit.\n'
Out[2503]:
9390
In [2504]:
df_age_d1529_2010 = df_2010.loc[(df_2010["Age_group"]=="15-29")]

df_age_d1529_2010
Out[2504]:
State Year Type Gender Age_group Total
2521 A & N ISLANDS 2010 Death of Dear Person Female 15-29 0
2534 A & N ISLANDS 2010 By Jumping off Moving Vehicles/Trains Male 15-29 0
2537 A & N ISLANDS 2010 Others Male 15-29 0
2712 A & N ISLANDS 2010 Property Dispute Male 15-29 0
2758 A & N ISLANDS 2010 Paralysis Female 15-29 0
... ... ... ... ... ... ...
236310 UTTARAKHAND 2010 Not having Children(Barrenness/Impotency Male 15-29 0
236320 UTTARAKHAND 2010 House Wife Male 15-29 0
236321 UTTARAKHAND 2010 Professional Activity Female 15-29 0
236534 WEST BENGAL 2010 Bankruptcy or Sudden change in Economic Male 15-29 10
236536 WEST BENGAL 2010 Death of Dear Person Female 15-29 15

3770 rows × 6 columns

In [2505]:
t_1529_2010 = df_age_d1529_2010.loc[:,"Total"]

s10_5 = np.sum(t_1529_2010)

s10_5
Out[2505]:
142867
In [2506]:
df_age_d3044_2010 = df_2010.loc[(df_2010["Age_group"]=="30-44")]

df_age_d3044_2010
Out[2506]:
State Year Type Gender Age_group Total
2523 A & N ISLANDS 2010 Divorce Female 30-44 0
2535 A & N ISLANDS 2010 By Machine Female 30-44 0
2538 A & N ISLANDS 2010 Others Female 30-44 0
2539 A & N ISLANDS 2010 Others Male 30-44 1
2540 A & N ISLANDS 2010 Professional Activity Male 30-44 0
... ... ... ... ... ... ...
236539 WEST BENGAL 2010 Professional/Career Problem Male 30-44 42
236545 WEST BENGAL 2010 Professional Activity Female 30-44 53
236547 WEST BENGAL 2010 Retired Person Female 30-44 0
236548 WEST BENGAL 2010 Service (Private) Female 30-44 69
236550 WEST BENGAL 2010 Unemployed Male 30-44 382

3764 rows × 6 columns

In [2507]:
t_3044_2010 = df_age_d3044_2010.loc[:,"Total"]

s10_6 = np.sum(t_3044_2010)
s10_6
Out[2507]:
134534
In [2508]:
df_age_d4559_2010 = df_2010.loc[(df_2010["Age_group"]=="45-59")]

df_age_d4559_2010
Out[2508]:
State Year Type Gender Age_group Total
2522 A & N ISLANDS 2010 Death of Dear Person Male 45-59 0
2524 A & N ISLANDS 2010 Divorce Male 45-59 0
2525 A & N ISLANDS 2010 Dowry Dispute Female 45-59 0
2528 A & N ISLANDS 2010 Family Problems Male 45-59 0
2529 A & N ISLANDS 2010 Ideological Causes/Hero Worshipping Female 45-59 0
... ... ... ... ... ... ...
236314 UTTARAKHAND 2010 Suspected/Illicit Relation Female 45-59 0
236315 UTTARAKHAND 2010 By Consuming Insecticides Male 45-59 3
236319 UTTARAKHAND 2010 By Jumping from (Other sites) Female 45-59 0
236537 WEST BENGAL 2010 Fall in Social Reputation Male 45-59 11
236542 WEST BENGAL 2010 By Jumping from (Building) Male 45-59 31

3762 rows × 6 columns

In [2509]:
t_4559_2010 = df_age_d4559_2010.loc[:,"Total"]

s10_7 = np.sum(t_4559_2010)

s10_7
Out[2509]:
83618
In [2510]:
df_age_d60_2010 = df_2010.loc[(df_2010["Age_group"]=="60+")]

df_age_d60_2010
Out[2510]:
State Year Type Gender Age_group Total
2756 A & N ISLANDS 2010 Failure in Examination Male 60+ 0
2763 A & N ISLANDS 2010 By Overdose of sleeping pills Female 60+ 0
2765 A & N ISLANDS 2010 By touching electric wires Female 60+ 0
2767 A & N ISLANDS 2010 Service (Private) Female 60+ 0
2768 A & N ISLANDS 2010 Service (Private) Male 60+ 3
... ... ... ... ... ... ...
236535 WEST BENGAL 2010 Cancellation/Non-Settlement of Marriage Female 60+ 0
236538 WEST BENGAL 2010 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
236544 WEST BENGAL 2010 Others Female 60+ 70
236546 WEST BENGAL 2010 Professional Activity Male 60+ 11
236549 WEST BENGAL 2010 Unemployed Female 60+ 1

3756 rows × 6 columns

In [2511]:
t_60_2010 = df_age_d60_2010.loc[:,"Total"]

s10_8 = np.sum(t_60_2010)
s10_8
Out[2511]:
33319
In [2512]:
df_age_d0100_2010 = df_2010.loc[(df_2010["Age_group"]=="0-100+")]

df_age_d0100_2010
Out[2512]:
State Year Type Gender Age_group Total
2531 A & N ISLANDS 2010 Middle Male 0-100+ 29
2713 A & N ISLANDS 2010 Diploma Male 0-100+ 0
3579 A & N ISLANDS 2010 Matriculate/Secondary Female 0-100+ 16
3657 A & N ISLANDS 2010 Middle Female 0-100+ 8
3814 A & N ISLANDS 2010 Divorcee Male 0-100+ 1
... ... ... ... ... ... ...
234216 MIZORAM 2010 No Education Female 0-100+ 4
234217 MIZORAM 2010 Primary Female 0-100+ 3
234417 NAGALAND 2010 Seperated Male 0-100+ 0
235229 RAJASTHAN 2010 Diploma Male 0-100+ 37
236551 WEST BENGAL 2010 Never Married Female 0-100+ 1766

910 rows × 6 columns

In [2513]:
t_0100_2010 = df_age_d0100_2010.loc[:,"Total"]

s10_54 = np.sum(t_0100_2010)
s10_54
Out[2513]:
269198
In [2514]:
df_014m_2010 = df_age_d014_2010.loc[(df_age_d014_2010["Gender"]=="Male")]
df_014m_2010
Out[2514]:
State Year Type Gender Age_group Total
2710 A & N ISLANDS 2010 Fall in Social Reputation Male 0-14 0
2714 A & N ISLANDS 2010 By Jumping from (Other sites) Male 0-14 0
2757 A & N ISLANDS 2010 Love Affairs Male 0-14 0
2859 A & N ISLANDS 2010 Unemployment Male 0-14 0
3020 A & N ISLANDS 2010 Illness (Aids/STD) Male 0-14 0
... ... ... ... ... ... ...
236084 UTTAR PRADESH 2010 Fall in Social Reputation Male 0-14 0
236090 UTTAR PRADESH 2010 By Over Alcoholism Male 0-14 0
236540 WEST BENGAL 2010 Unemployment Male 0-14 0
236541 WEST BENGAL 2010 By Hanging Male 0-14 64
236543 WEST BENGAL 2010 By Jumping off Moving Vehicles/Trains Male 0-14 0

1875 rows × 6 columns

In [2515]:
t_014m_2010 = df_014m_2010.loc[:,"Total"]

s10_9 = np.sum(t_014m_2010)
s10_9
Out[2515]:
4920
In [2516]:
df_014fm_2010 = df_age_d014_2010.loc[(df_age_d014_2010["Gender"]=="Female")]
df_014fm_2010
Out[2516]:
State Year Type Gender Age_group Total
2526 A & N ISLANDS 2010 Drug Abuse/Addiction Female 0-14 0
2527 A & N ISLANDS 2010 Failure in Examination Female 0-14 0
2530 A & N ISLANDS 2010 Professional/Career Problem Female 0-14 0
2533 A & N ISLANDS 2010 By Jumping from (Building) Female 0-14 0
2766 A & N ISLANDS 2010 Others Female 0-14 0
... ... ... ... ... ... ...
236082 UTTAR PRADESH 2010 Dowry Dispute Female 0-14 1
236083 UTTAR PRADESH 2010 Drug Abuse/Addiction Female 0-14 0
236086 UTTAR PRADESH 2010 Not having Children(Barrenness/Impotency Female 0-14 0
236089 UTTAR PRADESH 2010 By Machine Female 0-14 0
236306 UTTARAKHAND 2010 Cancer Female 0-14 0

1877 rows × 6 columns

In [2517]:
t_014fm_2010 = df_014fm_2010.loc[:,"Total"]

s10_10 = np.sum(t_014fm_2010)
s10_10
Out[2517]:
4470
In [2518]:
df_1529m_2010 = df_age_d1529_2010.loc[(df_age_d1529_2010["Gender"]=="Male")]
df_1529m_2010
Out[2518]:
State Year Type Gender Age_group Total
2534 A & N ISLANDS 2010 By Jumping off Moving Vehicles/Trains Male 15-29 0
2537 A & N ISLANDS 2010 Others Male 15-29 0
2712 A & N ISLANDS 2010 Property Dispute Male 15-29 0
2764 A & N ISLANDS 2010 By Self Infliction of injury Male 15-29 0
2858 A & N ISLANDS 2010 Professional/Career Problem Male 15-29 0
... ... ... ... ... ... ...
235890 TRIPURA 2010 Causes Not known Male 15-29 41
236309 UTTARAKHAND 2010 Divorce Male 15-29 0
236310 UTTARAKHAND 2010 Not having Children(Barrenness/Impotency Male 15-29 0
236320 UTTARAKHAND 2010 House Wife Male 15-29 0
236534 WEST BENGAL 2010 Bankruptcy or Sudden change in Economic Male 15-29 10

1887 rows × 6 columns

In [2519]:
t_1529m_2010 = df_1529m_2010.loc[:,"Total"]

s10_11 = np.sum(t_1529m_2010)
s10_11
Out[2519]:
79161
In [2520]:
df_1529fm_2010 = df_age_d1529_2010.loc[(df_age_d1529_2010["Gender"]=="Female")]
df_1529fm_2010
Out[2520]:
State Year Type Gender Age_group Total
2521 A & N ISLANDS 2010 Death of Dear Person Female 15-29 0
2758 A & N ISLANDS 2010 Paralysis Female 15-29 0
2759 A & N ISLANDS 2010 Poverty Female 15-29 1
2761 A & N ISLANDS 2010 By Jumping from (Building) Female 15-29 0
2857 A & N ISLANDS 2010 Other Prolonged Illness Female 15-29 3
... ... ... ... ... ... ...
235895 TRIPURA 2010 Professional/Career Problem Female 15-29 0
235898 TRIPURA 2010 By Jumping from (Building) Female 15-29 0
236092 UTTAR PRADESH 2010 Others Female 15-29 124
236321 UTTARAKHAND 2010 Professional Activity Female 15-29 0
236536 WEST BENGAL 2010 Death of Dear Person Female 15-29 15

1883 rows × 6 columns

In [2521]:
t_1529fm_2010 = df_1529fm_2010.loc[:,"Total"]

s10_12 = np.sum(t_1529fm_2010)
s10_12
Out[2521]:
63706
In [2522]:
df_3044m_2010 = df_age_d3044_2010.loc[(df_age_d3044_2010["Gender"]=="Male")]
df_3044m_2010
Out[2522]:
State Year Type Gender Age_group Total
2539 A & N ISLANDS 2010 Others Male 30-44 1
2540 A & N ISLANDS 2010 Professional Activity Male 30-44 0
2760 A & N ISLANDS 2010 Property Dispute Male 30-44 1
2861 A & N ISLANDS 2010 Unemployment Male 30-44 1
3027 A & N ISLANDS 2010 Public Sector Undertaking Male 30-44 0
... ... ... ... ... ... ...
235466 SIKKIM 2010 Failure in Examination Male 30-44 0
235481 SIKKIM 2010 Unemployed Male 30-44 12
236093 UTTAR PRADESH 2010 Others Male 30-44 123
236539 WEST BENGAL 2010 Professional/Career Problem Male 30-44 42
236550 WEST BENGAL 2010 Unemployed Male 30-44 382

1886 rows × 6 columns

In [2523]:
t_3044m_2010 = df_3044m_2010.loc[:,"Total"]

s10_13 = np.sum(t_3044m_2010)
s10_13
Out[2523]:
91332
In [2524]:
df_3044fm_2010 = df_age_d3044_2010.loc[(df_age_d3044_2010["Gender"]=="Female")]
df_3044fm_2010
Out[2524]:
State Year Type Gender Age_group Total
2523 A & N ISLANDS 2010 Divorce Female 30-44 0
2535 A & N ISLANDS 2010 By Machine Female 30-44 0
2538 A & N ISLANDS 2010 Others Female 30-44 0
2711 A & N ISLANDS 2010 Family Problems Female 30-44 1
2754 A & N ISLANDS 2010 Cancer Female 30-44 0
... ... ... ... ... ... ...
236313 UTTARAKHAND 2010 Professional/Career Problem Female 30-44 0
236318 UTTARAKHAND 2010 By Jumping from (Building) Female 30-44 0
236545 WEST BENGAL 2010 Professional Activity Female 30-44 53
236547 WEST BENGAL 2010 Retired Person Female 30-44 0
236548 WEST BENGAL 2010 Service (Private) Female 30-44 69

1878 rows × 6 columns

In [2525]:
t_3044fm_2010 = df_3044fm_2010.loc[:,"Total"]

s10_14 = np.sum(t_3044fm_2010)
s10_14
Out[2525]:
43202
In [2526]:
df_4559m_2010 = df_age_d4559_2010.loc[(df_age_d4559_2010["Gender"]=="Male")]
df_4559m_2010
Out[2526]:
State Year Type Gender Age_group Total
2522 A & N ISLANDS 2010 Death of Dear Person Male 45-59 0
2524 A & N ISLANDS 2010 Divorce Male 45-59 0
2528 A & N ISLANDS 2010 Family Problems Male 45-59 0
2536 A & N ISLANDS 2010 By Machine Male 45-59 0
2709 A & N ISLANDS 2010 Drug Abuse/Addiction Male 45-59 0
... ... ... ... ... ... ...
236087 UTTAR PRADESH 2010 Poverty Male 45-59 5
236307 UTTARAKHAND 2010 Cancer Male 45-59 0
236315 UTTARAKHAND 2010 By Consuming Insecticides Male 45-59 3
236537 WEST BENGAL 2010 Fall in Social Reputation Male 45-59 11
236542 WEST BENGAL 2010 By Jumping from (Building) Male 45-59 31

1885 rows × 6 columns

In [2527]:
t_4559m_2010 = df_4559m_2010.loc[:,"Total"]

s10_15 = np.sum(t_4559m_2010)
s10_15
Out[2527]:
62303
In [2528]:
df_4559fm_2010 = df_age_d4559_2010.loc[(df_age_d4559_2010["Gender"]=="Female")]
df_4559fm_2010
Out[2528]:
State Year Type Gender Age_group Total
2525 A & N ISLANDS 2010 Dowry Dispute Female 45-59 0
2529 A & N ISLANDS 2010 Ideological Causes/Hero Worshipping Female 45-59 0
2532 A & N ISLANDS 2010 By Drowning Female 45-59 0
2541 A & N ISLANDS 2010 Student Female 45-59 0
3013 A & N ISLANDS 2010 Bankruptcy or Sudden change in Economic Female 45-59 0
... ... ... ... ... ... ...
236094 UTTAR PRADESH 2010 Professional Activity Female 45-59 0
236096 UTTAR PRADESH 2010 Self-employed (Business activity) Female 45-59 0
236312 UTTARAKHAND 2010 Others Female 45-59 2
236314 UTTARAKHAND 2010 Suspected/Illicit Relation Female 45-59 0
236319 UTTARAKHAND 2010 By Jumping from (Other sites) Female 45-59 0

1877 rows × 6 columns

In [2529]:
t_4559fm_2010 = df_4559fm_2010.loc[:,"Total"]

s10_16 = np.sum(t_4559fm_2010)
s10_16
Out[2529]:
21315
In [2530]:
df_60m_2010 = df_age_d60_2010.loc[(df_age_d60_2010["Gender"]=="Male")]
df_60m_2010
Out[2530]:
State Year Type Gender Age_group Total
2756 A & N ISLANDS 2010 Failure in Examination Male 60+ 0
2768 A & N ISLANDS 2010 Service (Private) Male 60+ 3
2856 A & N ISLANDS 2010 Family Problems Male 60+ 2
3015 A & N ISLANDS 2010 Dowry Dispute Male 60+ 0
3016 A & N ISLANDS 2010 Drug Abuse/Addiction Male 60+ 0
... ... ... ... ... ... ...
235677 TAMIL NADU 2010 Failure in Examination Male 60+ 1
235692 TAMIL NADU 2010 Unemployed Male 60+ 169
236311 UTTARAKHAND 2010 Not having Children(Barrenness/Impotency Male 60+ 0
236316 UTTARAKHAND 2010 By Consuming Insecticides Male 60+ 2
236546 WEST BENGAL 2010 Professional Activity Male 60+ 11

1882 rows × 6 columns

In [2531]:
t_60m_2010 = df_60m_2010.loc[:,"Total"]

s10_17 = np.sum(t_60m_2010)
s10_17
Out[2531]:
23821
In [2532]:
df_60fm_2010 = df_age_d60_2010.loc[(df_age_d60_2010["Gender"]=="Female")]
df_60fm_2010
Out[2532]:
State Year Type Gender Age_group Total
2763 A & N ISLANDS 2010 By Overdose of sleeping pills Female 60+ 0
2765 A & N ISLANDS 2010 By touching electric wires Female 60+ 0
2767 A & N ISLANDS 2010 Service (Private) Female 60+ 0
2862 A & N ISLANDS 2010 Others Female 60+ 0
3350 A & N ISLANDS 2010 Others Female 60+ 0
... ... ... ... ... ... ...
236322 UTTARAKHAND 2010 Public Sector Undertaking Female 60+ 0
236535 WEST BENGAL 2010 Cancellation/Non-Settlement of Marriage Female 60+ 0
236538 WEST BENGAL 2010 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
236544 WEST BENGAL 2010 Others Female 60+ 70
236549 WEST BENGAL 2010 Unemployed Female 60+ 1

1874 rows × 6 columns

In [2533]:
t_60fm_2010 = df_60fm_2010.loc[:,"Total"]

s10_18 = np.sum(t_60fm_2010)
s10_18
Out[2533]:
9498
In [2534]:
df_0100fm_2010 = df_age_d0100_2010.loc[(df_age_d0100_2010["Gender"]=="Female")]
df_0100fm_2010
Out[2534]:
State Year Type Gender Age_group Total
3579 A & N ISLANDS 2010 Matriculate/Secondary Female 0-100+ 16
3657 A & N ISLANDS 2010 Middle Female 0-100+ 8
3815 A & N ISLANDS 2010 Seperated Female 0-100+ 0
4785 A & N ISLANDS 2010 Married Female 0-100+ 31
4786 A & N ISLANDS 2010 Never Married Female 0-100+ 11
... ... ... ... ... ... ...
233609 MAHARASHTRA 2010 Never Married Female 0-100+ 1271
233798 MANIPUR 2010 Diploma Female 0-100+ 0
234216 MIZORAM 2010 No Education Female 0-100+ 4
234217 MIZORAM 2010 Primary Female 0-100+ 3
236551 WEST BENGAL 2010 Never Married Female 0-100+ 1766

455 rows × 6 columns

In [2535]:
t_0100fm_2010 = df_0100fm_2010.loc[:,"Total"]

s10_55 = np.sum(t_0100fm_2010)
s10_55
Out[2535]:
94838
In [2536]:
df_0100m_2010 = df_age_d0100_2010.loc[(df_age_d0100_2010["Gender"]=="Male")]
df_0100m_2010
Out[2536]:
State Year Type Gender Age_group Total
2531 A & N ISLANDS 2010 Middle Male 0-100+ 29
2713 A & N ISLANDS 2010 Diploma Male 0-100+ 0
3814 A & N ISLANDS 2010 Divorcee Male 0-100+ 1
4616 A & N ISLANDS 2010 Matriculate/Secondary Male 0-100+ 31
4617 A & N ISLANDS 2010 No Education Male 0-100+ 17
... ... ... ... ... ... ...
233595 MAHARASHTRA 2010 Primary Male 0-100+ 2778
233799 MANIPUR 2010 Graduate Male 0-100+ 0
233800 MANIPUR 2010 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 3
234417 NAGALAND 2010 Seperated Male 0-100+ 0
235229 RAJASTHAN 2010 Diploma Male 0-100+ 37

455 rows × 6 columns

In [2537]:
t_0100m_2010 = df_0100m_2010.loc[:,"Total"]

s10_56 = np.sum(t_0100m_2010)
s10_56
Out[2537]:
174360
In [2538]:
df_st_AN_2010 = df_2010.loc[(df_2010["State"]=="A & N ISLANDS")]

df_st_AN_2010
Out[2538]:
State Year Type Gender Age_group Total
2521 A & N ISLANDS 2010 Death of Dear Person Female 15-29 0
2522 A & N ISLANDS 2010 Death of Dear Person Male 45-59 0
2523 A & N ISLANDS 2010 Divorce Female 30-44 0
2524 A & N ISLANDS 2010 Divorce Male 45-59 0
2525 A & N ISLANDS 2010 Dowry Dispute Female 45-59 0
... ... ... ... ... ... ...
10399 A & N ISLANDS 2010 Professional Activity Female 30-44 0
10400 A & N ISLANDS 2010 Self-employed (Business activity) Female 30-44 0
10401 A & N ISLANDS 2010 Self-employed (Business activity) Female 60+ 0
10402 A & N ISLANDS 2010 Service (Government) Male 30-44 8
10403 A & N ISLANDS 2010 Unemployed Male 15-29 13

559 rows × 6 columns

In [2539]:
t_AN_2010 = df_st_AN_2010.loc[:,"Total"]

s10_19 = np.sum(t_AN_2010)
s10_19
Out[2539]:
780
In [2540]:
df_st_AP_2010 = df_2010.loc[(df_2010["State"]=="ANDHRA PRADESH")]

df_st_AP_2010
Out[2540]:
State Year Type Gender Age_group Total
9402 ANDHRA PRADESH 2010 Bankruptcy or Sudden change in Economic Female 60+ 6
9403 ANDHRA PRADESH 2010 Bankruptcy or Sudden change in Economic Male 45-59 157
9404 ANDHRA PRADESH 2010 Dowry Dispute Female 15-29 86
9405 ANDHRA PRADESH 2010 Dowry Dispute Female 60+ 0
9406 ANDHRA PRADESH 2010 Dowry Dispute Male 45-59 0
... ... ... ... ... ... ...
229500 ANDHRA PRADESH 2010 Self-employed (Business activity) Female 45-59 10
229501 ANDHRA PRADESH 2010 Self-employed (Business activity) Male 15-29 324
229502 ANDHRA PRADESH 2010 Unemployed Female 30-44 48
229503 ANDHRA PRADESH 2010 Unemployed Male 15-29 266
229504 ANDHRA PRADESH 2010 Unemployed Male 60+ 0

566 rows × 6 columns

In [2541]:
t_AP_2010 = df_st_AP_2010.loc[:,"Total"]

s10_20 = np.sum(t_AP_2010)
s10_20
Out[2541]:
79505
In [2542]:
df_st_ARP_2010 = df_2010.loc[(df_2010["State"]=="ARUNACHAL PRADESH")]

df_st_ARP_2010
Out[2542]:
State Year Type Gender Age_group Total
14689 ARUNACHAL PRADESH 2010 Bankruptcy or Sudden change in Economic Male 15-29 0
14690 ARUNACHAL PRADESH 2010 Death of Dear Person Male 15-29 0
14691 ARUNACHAL PRADESH 2010 Drug Abuse/Addiction Male 0-14 0
14692 ARUNACHAL PRADESH 2010 Family Problems Female 15-29 2
14693 ARUNACHAL PRADESH 2010 Family Problems Male 15-29 6
... ... ... ... ... ... ...
229696 ARUNACHAL PRADESH 2010 By touching electric wires Male 0-14 0
229697 ARUNACHAL PRADESH 2010 Farming/Agriculture Activity Female 60+ 0
229698 ARUNACHAL PRADESH 2010 Others Male 60+ 1
229699 ARUNACHAL PRADESH 2010 Public Sector Undertaking Female 45-59 0
229700 ARUNACHAL PRADESH 2010 Unemployed Male 15-29 2

562 rows × 6 columns

In [2543]:
t_ARP_2010 = df_st_ARP_2010.loc[:,"Total"]

s10_21 = np.sum(t_ARP_2010)
s10_21
Out[2543]:
655
In [2544]:
df_st_AS_2010 = df_2010.loc[(df_2010["State"]=="ASSAM")]

df_st_AS_2010
Out[2544]:
State Year Type Gender Age_group Total
19426 ASSAM 2010 Drug Abuse/Addiction Female 0-14 1
19427 ASSAM 2010 Love Affairs Female 60+ 0
19428 ASSAM 2010 Not having Children(Barrenness/Impotency Female 45-59 0
19429 ASSAM 2010 Paralysis Female 30-44 0
19430 ASSAM 2010 Paralysis Male 60+ 0
... ... ... ... ... ... ...
229881 ASSAM 2010 Others Male 60+ 9
229882 ASSAM 2010 Professional Activity Female 15-29 7
229883 ASSAM 2010 Professional Activity Male 45-59 29
229884 ASSAM 2010 Public Sector Undertaking Male 45-59 26
229885 ASSAM 2010 Service (Government) Female 15-29 1

566 rows × 6 columns

In [2545]:
t_AS_2010 = df_st_AS_2010.loc[:,"Total"]

s10_22 = np.sum(t_AS_2010)
s10_22
Out[2545]:
14965
In [2546]:
df_st_BH_2010 = df_2010.loc[(df_2010["State"]=="BIHAR")]

df_st_BH_2010
Out[2546]:
State Year Type Gender Age_group Total
24686 BIHAR 2010 Causes Not known Female 0-14 8
24687 BIHAR 2010 Divorce Female 15-29 0
24688 BIHAR 2010 Failure in Examination Male 15-29 17
24689 BIHAR 2010 Love Affairs Female 60+ 0
24690 BIHAR 2010 Not having Children(Barrenness/Impotency Female 60+ 0
... ... ... ... ... ... ...
230146 BIHAR 2010 Public Sector Undertaking Female 30-44 0
230147 BIHAR 2010 Retired Person Male 15-29 0
230148 BIHAR 2010 Self-employed (Business activity) Female 60+ 0
230149 BIHAR 2010 Student Male 60+ 0
230150 BIHAR 2010 Unemployed Female 45-59 3

566 rows × 6 columns

In [2547]:
t_BH_2010 = df_st_BH_2010.loc[:,"Total"]

s10_23 = np.sum(t_BH_2010)
s10_23
Out[2547]:
6130
In [2548]:
df_st_CH_2010 = df_2010.loc[(df_2010["State"]=="CHANDIGARH")]

df_st_CH_2010
Out[2548]:
State Year Type Gender Age_group Total
33156 CHANDIGARH 2010 Bankruptcy or Sudden change in Economic Male 45-59 0
33157 CHANDIGARH 2010 Death of Dear Person Female 15-29 0
33158 CHANDIGARH 2010 Death of Dear Person Female 60+ 0
33159 CHANDIGARH 2010 Drug Abuse/Addiction Female 0-14 0
33160 CHANDIGARH 2010 Fall in Social Reputation Male 60+ 0
... ... ... ... ... ... ...
230357 CHANDIGARH 2010 By Jumping from (Other sites) Female 0-14 0
230358 CHANDIGARH 2010 By Jumping from (Other sites) Male 45-59 0
230359 CHANDIGARH 2010 Public Sector Undertaking Male 60+ 0
230360 CHANDIGARH 2010 Self-employed (Business activity) Male 15-29 0
230361 CHANDIGARH 2010 Service (Private) Male 15-29 4

560 rows × 6 columns

In [2549]:
t_CH_2010 = df_st_CH_2010.loc[:,"Total"]

s10_24 = np.sum(t_CH_2010)
s10_24
Out[2549]:
355
In [2550]:
df_st_CT_2010 = df_2010.loc[(df_2010["State"]=="CHHATTISGARH")]

df_st_CT_2010
Out[2550]:
State Year Type Gender Age_group Total
39235 CHHATTISGARH 2010 Causes Not known Male 0-14 41
39236 CHHATTISGARH 2010 Dowry Dispute Female 45-59 0
39237 CHHATTISGARH 2010 Not having Children(Barrenness/Impotency Female 30-44 4
39238 CHHATTISGARH 2010 Others Male 45-59 276
39239 CHHATTISGARH 2010 Professional/Career Problem Female 0-14 0
... ... ... ... ... ... ...
230565 CHHATTISGARH 2010 Others Female 0-14 23
230566 CHHATTISGARH 2010 Others Male 15-29 294
230567 CHHATTISGARH 2010 Others Male 60+ 175
230568 CHHATTISGARH 2010 Professional Activity Male 0-14 0
230569 CHHATTISGARH 2010 Public Sector Undertaking Male 0-14 0

565 rows × 6 columns

In [2551]:
t_CT_2010 = df_st_CT_2010.loc[:,"Total"]

s10_25 = np.sum(t_CT_2010)
s10_25
Out[2551]:
32563
In [2552]:
df_st_DN_2010 = df_2010.loc[(df_2010["State"]=="D & N HAVELI")]

df_st_DN_2010
Out[2552]:
State Year Type Gender Age_group Total
45603 D & N HAVELI 2010 Failure in Examination Female 30-44 0
45604 D & N HAVELI 2010 Ideological Causes/Hero Worshipping Male 60+ 0
45605 D & N HAVELI 2010 Illness (Aids/STD) Female 60+ 0
45606 D & N HAVELI 2010 Love Affairs Male 60+ 0
45607 D & N HAVELI 2010 Others Female 30-44 0
... ... ... ... ... ... ...
230785 D & N HAVELI 2010 By Consuming Other Poison Male 60+ 1
230786 D & N HAVELI 2010 By Jumping from (Other sites) Male 60+ 0
230787 D & N HAVELI 2010 Others Male 60+ 5
230788 D & N HAVELI 2010 Student Male 0-14 0
230789 D & N HAVELI 2010 Unemployed Male 0-14 0

560 rows × 6 columns

In [2553]:
t_DN_2010 = df_st_DN_2010.loc[:,"Total"]

s10_26 = np.sum(t_DN_2010)
s10_26
Out[2553]:
315
In [2554]:
df_st_DD_2010 = df_2010.loc[(df_2010["State"]=="DAMAN & DIU")]

df_st_DD_2010
Out[2554]:
State Year Type Gender Age_group Total
50916 DAMAN & DIU 2010 Fall in Social Reputation Male 45-59 0
50917 DAMAN & DIU 2010 Insanity/Mental Illness Female 0-14 0
50918 DAMAN & DIU 2010 By Drowning Male 60+ 0
50919 DAMAN & DIU 2010 By Fire-Arms Male 60+ 0
50920 DAMAN & DIU 2010 By Jumping from (Other sites) Female 0-14 0
... ... ... ... ... ... ...
230976 DAMAN & DIU 2010 Others Female 15-29 2
230977 DAMAN & DIU 2010 Self-employed (Business activity) Female 45-59 0
230978 DAMAN & DIU 2010 Student Female 0-14 0
230979 DAMAN & DIU 2010 Student Male 45-59 0
230980 DAMAN & DIU 2010 Divorcee Female 0-100+ 0

559 rows × 6 columns

In [2555]:
t_DD_2010 = df_st_DD_2010.loc[:,"Total"]

s10_27 = np.sum(t_DD_2010)
s10_27
Out[2555]:
155
In [2556]:
df_st_DL_2010 = df_2010.loc[(df_2010["State"]=="DELHI (UT)")]

df_st_DL_2010
Out[2556]:
State Year Type Gender Age_group Total
57296 DELHI (UT) 2010 Cancer Female 45-59 1
57297 DELHI (UT) 2010 Cancer Female 60+ 0
57298 DELHI (UT) 2010 Cancer Male 45-59 0
57299 DELHI (UT) 2010 Divorce Female 60+ 0
57300 DELHI (UT) 2010 Divorce Male 45-59 0
... ... ... ... ... ... ...
231227 DELHI (UT) 2010 Others Female 30-44 6
231228 DELHI (UT) 2010 Others Female 45-59 1
231229 DELHI (UT) 2010 Others Male 30-44 55
231230 DELHI (UT) 2010 Retired Person Female 30-44 0
231231 DELHI (UT) 2010 Service (Government) Male 15-29 2

564 rows × 6 columns

In [2557]:
t_DL_2010 = df_st_DL_2010.loc[:,"Total"]

s10_28 = np.sum(t_DL_2010)
s10_28
Out[2557]:
7713
In [2558]:
df_st_GOA_2010 = df_2010.loc[(df_2010["State"]=="GOA")]

df_st_GOA_2010
Out[2558]:
State Year Type Gender Age_group Total
62396 GOA 2010 Bankruptcy or Sudden change in Economic Female 0-14 0
62397 GOA 2010 Cancellation/Non-Settlement of Marriage Female 0-14 0
62398 GOA 2010 Failure in Examination Male 30-44 0
62399 GOA 2010 Illness (Aids/STD) Male 60+ 0
62400 GOA 2010 Others Female 45-59 0
... ... ... ... ... ... ...
231452 GOA 2010 By Fire-Arms Male 30-44 0
231453 GOA 2010 By touching electric wires Female 0-14 0
231454 GOA 2010 Farming/Agriculture Activity Male 60+ 7
231455 GOA 2010 House Wife Male 15-29 0
231456 GOA 2010 Service (Government) Male 60+ 0

563 rows × 6 columns

In [2559]:
t_GOA_2010 = df_st_GOA_2010.loc[:,"Total"]

s10_29 = np.sum(t_GOA_2010)
s10_29
Out[2559]:
1610
In [2560]:
df_st_GJ_2010 = df_2010.loc[(df_2010["State"]=="GUJARAT")]

df_st_GJ_2010
Out[2560]:
State Year Type Gender Age_group Total
69892 GUJARAT 2010 Illness (Aids/STD) Male 0-14 0
69893 GUJARAT 2010 Insanity/Mental Illness Male 30-44 134
69894 GUJARAT 2010 Love Affairs Female 30-44 17
69895 GUJARAT 2010 Paralysis Female 30-44 1
69896 GUJARAT 2010 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
... ... ... ... ... ... ...
231667 GUJARAT 2010 By Fire/Self Immolation Female 45-59 95
231668 GUJARAT 2010 Farming/Agriculture Activity Male 45-59 104
231669 GUJARAT 2010 Service (Private) Female 0-14 0
231670 GUJARAT 2010 Service (Private) Male 45-59 116
231671 GUJARAT 2010 Divorcee Female 0-100+ 57

566 rows × 6 columns

In [2561]:
t_GJ_2010 = df_st_GJ_2010.loc[:,"Total"]

s10_30 = np.sum(t_GJ_2010)
s10_30
Out[2561]:
31035
In [2562]:
df_st_HR_2010 = df_2010.loc[(df_2010["State"]=="HARYANA")]

df_st_HR_2010
Out[2562]:
State Year Type Gender Age_group Total
74649 HARYANA 2010 Cancer Male 60+ 0
74650 HARYANA 2010 Divorce Male 60+ 0
74651 HARYANA 2010 Insanity/Mental Illness Female 45-59 6
74652 HARYANA 2010 Insanity/Mental Illness Female 60+ 2
74653 HARYANA 2010 Love Affairs Female 15-29 11
... ... ... ... ... ... ...
231862 HARYANA 2010 Service (Government) Male 15-29 14
231863 HARYANA 2010 Service (Private) Female 0-14 0
231864 HARYANA 2010 Service (Private) Female 15-29 18
231865 HARYANA 2010 Student Female 30-44 0
231866 HARYANA 2010 Married Female 0-100+ 488

565 rows × 6 columns

In [2563]:
t_HR_2010 = df_st_HR_2010.loc[:,"Total"]

s10_31 = np.sum(t_HR_2010)
s10_31
Out[2563]:
14470
In [2564]:
df_st_HP_2010 = df_2010.loc[(df_2010["State"]=="HIMACHAL PRADESH")]

df_st_HP_2010
Out[2564]:
State Year Type Gender Age_group Total
82182 HIMACHAL PRADESH 2010 Dowry Dispute Female 0-14 0
82183 HIMACHAL PRADESH 2010 Drug Abuse/Addiction Female 30-44 0
82184 HIMACHAL PRADESH 2010 Family Problems Female 0-14 0
82185 HIMACHAL PRADESH 2010 Ideological Causes/Hero Worshipping Female 0-14 0
82186 HIMACHAL PRADESH 2010 Insanity/Mental Illness Female 15-29 5
... ... ... ... ... ... ...
232102 HIMACHAL PRADESH 2010 Suspected/Illicit Relation Female 60+ 0
232103 HIMACHAL PRADESH 2010 By Consuming Other Poison Female 60+ 1
232104 HIMACHAL PRADESH 2010 By Machine Female 45-59 0
232105 HIMACHAL PRADESH 2010 Professional Activity Male 15-29 10
232106 HIMACHAL PRADESH 2010 Unemployed Female 0-14 0

564 rows × 6 columns

In [2565]:
t_HP_2010 = df_st_HP_2010.loc[:,"Total"]

s10_32 = np.sum(t_HP_2010)
s10_32
Out[2565]:
2703
In [2566]:
df_st_JK_2010 = df_2010.loc[(df_2010["State"]=="JAMMU & KASHMIR")]

df_st_JK_2010
Out[2566]:
State Year Type Gender Age_group Total
88442 JAMMU & KASHMIR 2010 Cancellation/Non-Settlement of Marriage Male 0-14 0
88443 JAMMU & KASHMIR 2010 Divorce Male 60+ 0
88444 JAMMU & KASHMIR 2010 Dowry Dispute Female 60+ 0
88445 JAMMU & KASHMIR 2010 Family Problems Female 30-44 13
88446 JAMMU & KASHMIR 2010 Illness (Aids/STD) Female 0-14 0
... ... ... ... ... ... ...
232330 JAMMU & KASHMIR 2010 Service (Private) Female 30-44 0
232331 JAMMU & KASHMIR 2010 Student Male 0-14 3
232332 JAMMU & KASHMIR 2010 Unemployed Male 0-14 0
232333 JAMMU & KASHMIR 2010 Unemployed Male 15-29 12
232334 JAMMU & KASHMIR 2010 Seperated Male 0-100+ 8

564 rows × 6 columns

In [2567]:
t_JK_2010 = df_st_JK_2010.loc[:,"Total"]

s10_33 = np.sum(t_JK_2010)
s10_33
Out[2567]:
1295
In [2568]:
df_st_JH_2010 = df_2010.loc[(df_2010["State"]=="JHARKHAND")]

df_st_JH_2010
Out[2568]:
State Year Type Gender Age_group Total
94196 JHARKHAND 2010 Bankruptcy or Sudden change in Economic Female 45-59 3
94197 JHARKHAND 2010 Failure in Examination Female 30-44 0
94198 JHARKHAND 2010 Illness (Aids/STD) Female 15-29 0
94199 JHARKHAND 2010 Love Affairs Male 60+ 0
94200 JHARKHAND 2010 Not having Children(Barrenness/Impotency Female 45-59 8
... ... ... ... ... ... ...
232565 JHARKHAND 2010 By Jumping from (Other sites) Female 15-29 2
232566 JHARKHAND 2010 Professional Activity Male 0-14 0
232567 JHARKHAND 2010 Service (Government) Male 0-14 0
232568 JHARKHAND 2010 Service (Private) Male 60+ 0
232569 JHARKHAND 2010 Unemployed Female 15-29 8

565 rows × 6 columns

In [2569]:
t_JH_2010 = df_st_JH_2010.loc[:,"Total"]

s10_34 = np.sum(t_JH_2010)
s10_34
Out[2569]:
6158
In [2570]:
df_st_KN_2010 = df_2010.loc[(df_2010["State"]=="KARNATAKA")]

df_st_KN_2010
Out[2570]:
State Year Type Gender Age_group Total
98929 KARNATAKA 2010 Bankruptcy or Sudden change in Economic Female 30-44 4
98930 KARNATAKA 2010 Cancellation/Non-Settlement of Marriage Female 60+ 0
98931 KARNATAKA 2010 Cancellation/Non-Settlement of Marriage Male 45-59 0
98932 KARNATAKA 2010 Illegitimate Pregnancy Female 45-59 0
98933 KARNATAKA 2010 Illness (Aids/STD) Female 45-59 3
... ... ... ... ... ... ...
232720 KARNATAKA 2010 House Wife Male 0-14 0
232721 KARNATAKA 2010 Others Female 60+ 47
232722 KARNATAKA 2010 Professional Activity Female 0-14 0
232723 KARNATAKA 2010 Public Sector Undertaking Female 0-14 0
232724 KARNATAKA 2010 Student Female 15-29 176

566 rows × 6 columns

In [2571]:
t_KN_2010 = df_st_KN_2010.loc[:,"Total"]

s10_35 = np.sum(t_KN_2010)
s10_35
Out[2571]:
63255
In [2572]:
df_st_KER_2010 = df_2010.loc[(df_2010["State"]=="KERALA")]

df_st_KER_2010
Out[2572]:
State Year Type Gender Age_group Total
105836 KERALA 2010 Bankruptcy or Sudden change in Economic Male 15-29 40
105837 KERALA 2010 Bankruptcy or Sudden change in Economic Male 60+ 46
105838 KERALA 2010 Drug Abuse/Addiction Female 30-44 0
105839 KERALA 2010 Failure in Examination Male 30-44 3
105840 KERALA 2010 Fall in Social Reputation Male 60+ 4
... ... ... ... ... ... ...
232936 KERALA 2010 House Wife Female 0-14 0
232937 KERALA 2010 House Wife Male 45-59 0
232938 KERALA 2010 Professional Activity Female 30-44 5
232939 KERALA 2010 Service (Private) Female 45-59 13
232940 KERALA 2010 Student Male 45-59 0

566 rows × 6 columns

In [2573]:
t_KER_2010 = df_st_KER_2010.loc[:,"Total"]

s10_36 = np.sum(t_KER_2010)
s10_36
Out[2573]:
42930
In [2574]:
df_st_LD_2010 = df_2010.loc[(df_2010["State"]=="LAKSHADWEEP")]

df_st_LD_2010
Out[2574]:
State Year Type Gender Age_group Total
110318 LAKSHADWEEP 2010 Cancellation/Non-Settlement of Marriage Male 45-59 0
110319 LAKSHADWEEP 2010 Causes Not known Female 60+ 0
110320 LAKSHADWEEP 2010 Causes Not known Male 45-59 0
110321 LAKSHADWEEP 2010 Dowry Dispute Male 45-59 0
110322 LAKSHADWEEP 2010 Fall in Social Reputation Female 60+ 0
... ... ... ... ... ... ...
233155 LAKSHADWEEP 2010 House Wife Female 45-59 0
233156 LAKSHADWEEP 2010 Professional Activity Male 15-29 0
233157 LAKSHADWEEP 2010 Public Sector Undertaking Male 15-29 0
233158 LAKSHADWEEP 2010 Public Sector Undertaking Male 60+ 0
233159 LAKSHADWEEP 2010 Self-employed (Business activity) Male 15-29 0

556 rows × 6 columns

In [2575]:
t_LD_2010 = df_st_LD_2010.loc[:,"Total"]

s10_37 = np.sum(t_LD_2010)
s10_37
Out[2575]:
5
In [2576]:
df_st_MP_2010 = df_2010.loc[(df_2010["State"]=="MADHYA PRADESH")]

df_st_MP_2010
Out[2576]:
State Year Type Gender Age_group Total
116348 MADHYA PRADESH 2010 Drug Abuse/Addiction Male 30-44 196
116349 MADHYA PRADESH 2010 Family Problems Female 15-29 325
116350 MADHYA PRADESH 2010 Family Problems Male 60+ 60
116351 MADHYA PRADESH 2010 Illegitimate Pregnancy Male 0-14 0
116352 MADHYA PRADESH 2010 Love Affairs Male 45-59 0
... ... ... ... ... ... ...
233371 MADHYA PRADESH 2010 House Wife Male 0-14 0
233372 MADHYA PRADESH 2010 Others Female 45-59 23
233373 MADHYA PRADESH 2010 Others Female 60+ 19
233374 MADHYA PRADESH 2010 Service (Government) Male 0-14 0
233375 MADHYA PRADESH 2010 Unemployed Female 0-14 8

566 rows × 6 columns

In [2577]:
t_MP_2010 = df_st_MP_2010.loc[:,"Total"]

s10_38 = np.sum(t_MP_2010)
s10_38
Out[2577]:
45015
In [2578]:
df_st_MH_2010 = df_2010.loc[(df_2010["State"]=="MAHARASHTRA")]

df_st_MH_2010
Out[2578]:
State Year Type Gender Age_group Total
123247 MAHARASHTRA 2010 Divorce Male 15-29 9
123248 MAHARASHTRA 2010 Dowry Dispute Female 15-29 180
123249 MAHARASHTRA 2010 Failure in Examination Male 0-14 11
123250 MAHARASHTRA 2010 Fall in Social Reputation Female 0-14 3
123251 MAHARASHTRA 2010 Fall in Social Reputation Female 45-59 5
... ... ... ... ... ... ...
233605 MAHARASHTRA 2010 Retired Person Female 0-14 0
233606 MAHARASHTRA 2010 Retired Person Female 15-29 0
233607 MAHARASHTRA 2010 Service (Government) Female 45-59 1
233608 MAHARASHTRA 2010 Student Female 60+ 0
233609 MAHARASHTRA 2010 Never Married Female 0-100+ 1271

566 rows × 6 columns

In [2579]:
t_MH_2010 = df_st_MH_2010.loc[:,"Total"]

s10_39 = np.sum(t_MH_2010)
s10_39
Out[2579]:
79580
In [2580]:
df_st_MN_2010 = df_2010.loc[(df_2010["State"]=="MANIPUR")]

df_st_MN_2010
Out[2580]:
State Year Type Gender Age_group Total
127672 MANIPUR 2010 Cancer Female 0-14 0
127673 MANIPUR 2010 Death of Dear Person Male 0-14 0
127674 MANIPUR 2010 Illegitimate Pregnancy Male 60+ 0
127675 MANIPUR 2010 Poverty Female 30-44 0
127676 MANIPUR 2010 Professional/Career Problem Female 30-44 0
... ... ... ... ... ... ...
233804 MANIPUR 2010 Others Male 45-59 0
233805 MANIPUR 2010 Professional Activity Female 30-44 0
233806 MANIPUR 2010 Service (Government) Female 30-44 0
233807 MANIPUR 2010 Student Male 30-44 0
233808 MANIPUR 2010 Unemployed Male 60+ 0

560 rows × 6 columns

In [2581]:
t_MN_2010 = df_st_MN_2010.loc[:,"Total"]

s10_40 = np.sum(t_MN_2010)
s10_40
Out[2581]:
185
In [2582]:
df_st_MG_2010 = df_2010.loc[(df_2010["State"]=="MEGHALAYA")]

df_st_MG_2010
Out[2582]:
State Year Type Gender Age_group Total
132953 MEGHALAYA 2010 Bankruptcy or Sudden change in Economic Female 0-14 0
132954 MEGHALAYA 2010 Illness (Aids/STD) Female 15-29 0
132955 MEGHALAYA 2010 Physical Abuse (Rape/Incest Etc.) Male 60+ 0
132956 MEGHALAYA 2010 By Overdose of sleeping pills Female 60+ 0
132957 MEGHALAYA 2010 By touching electric wires Male 30-44 0
... ... ... ... ... ... ...
233994 MEGHALAYA 2010 Others Female 0-14 0
233995 MEGHALAYA 2010 Others Male 30-44 2
233996 MEGHALAYA 2010 Professional Activity Female 30-44 0
233997 MEGHALAYA 2010 Service (Government) Female 30-44 0
233998 MEGHALAYA 2010 Unemployed Male 60+ 0

559 rows × 6 columns

In [2583]:
t_MG_2010 = df_st_MG_2010.loc[:,"Total"]

s10_41 = np.sum(t_MG_2010)
s10_41
Out[2583]:
537
In [2584]:
df_st_MZ_2010 = df_2010.loc[(df_2010["State"]=="MIZORAM")]

df_st_MZ_2010
Out[2584]:
State Year Type Gender Age_group Total
140180 MIZORAM 2010 Cancellation/Non-Settlement of Marriage Male 45-59 0
140181 MIZORAM 2010 Failure in Examination Female 15-29 0
140182 MIZORAM 2010 Illegitimate Pregnancy Female 45-59 0
140183 MIZORAM 2010 Illness (Aids/STD) Male 0-14 0
140184 MIZORAM 2010 Paralysis Male 60+ 0
... ... ... ... ... ... ...
234223 MIZORAM 2010 Others Male 60+ 0
234224 MIZORAM 2010 By Overdose of sleeping pills Male 15-29 1
234225 MIZORAM 2010 Retired Person Female 30-44 0
234226 MIZORAM 2010 Service (Private) Female 0-14 0
234227 MIZORAM 2010 Service (Private) Male 45-59 0

559 rows × 6 columns

In [2585]:
t_MN_2010 = df_st_MN_2010.loc[:,"Total"]

s10_42 = np.sum(t_MN_2010)
s10_42
Out[2585]:
185
In [2586]:
df_st_NG_2010 = df_2010.loc[(df_2010["State"]=="NAGALAND")]

df_st_NG_2010
Out[2586]:
State Year Type Gender Age_group Total
144634 NAGALAND 2010 Dowry Dispute Male 0-14 0
144635 NAGALAND 2010 Illegitimate Pregnancy Female 45-59 0
144636 NAGALAND 2010 Love Affairs Female 0-14 0
144637 NAGALAND 2010 Love Affairs Male 45-59 0
144638 NAGALAND 2010 Paralysis Male 30-44 0
... ... ... ... ... ... ...
234413 NAGALAND 2010 By Overdose of sleeping pills Female 60+ 0
234414 NAGALAND 2010 By Self Infliction of injury Female 60+ 0
234415 NAGALAND 2010 Others Male 30-44 0
234416 NAGALAND 2010 Others Male 60+ 0
234417 NAGALAND 2010 Seperated Male 0-100+ 0

556 rows × 6 columns

In [2587]:
t_NG_2010 = df_st_NG_2010.loc[:,"Total"]

s10_43 = np.sum(t_NG_2010)
s10_43
Out[2587]:
60
In [2588]:
df_st_OD_2010 = df_2010.loc[(df_2010["State"]=="ODISHA")]

df_st_OD_2010
Out[2588]:
State Year Type Gender Age_group Total
151303 ODISHA 2010 Bankruptcy or Sudden change in Economic Female 15-29 0
151304 ODISHA 2010 Bankruptcy or Sudden change in Economic Male 15-29 4
151305 ODISHA 2010 Causes Not known Male 60+ 53
151306 ODISHA 2010 Failure in Examination Female 30-44 0
151307 ODISHA 2010 Illegitimate Pregnancy Female 60+ 0
... ... ... ... ... ... ...
234613 ODISHA 2010 Professional Activity Female 15-29 2
234614 ODISHA 2010 Professional Activity Male 45-59 15
234615 ODISHA 2010 Service (Private) Female 0-14 0
234616 ODISHA 2010 Unemployed Female 15-29 47
234617 ODISHA 2010 Unemployed Female 30-44 25

566 rows × 6 columns

In [2589]:
t_OD_2010 = df_st_OD_2010.loc[:,"Total"]

s10_44 = np.sum(t_OD_2010)
s10_44
Out[2589]:
21275
In [2590]:
df_st_PD_2010 = df_2010.loc[(df_2010["State"]=="PUDUCHERRY")]

df_st_PD_2010
Out[2590]:
State Year Type Gender Age_group Total
155577 PUDUCHERRY 2010 Causes Not known Male 30-44 5
155578 PUDUCHERRY 2010 Death of Dear Person Male 30-44 1
155579 PUDUCHERRY 2010 Drug Abuse/Addiction Male 15-29 0
155580 PUDUCHERRY 2010 Not having Children(Barrenness/Impotency Male 15-29 0
155581 PUDUCHERRY 2010 Unemployment Male 60+ 0
... ... ... ... ... ... ...
234842 PUDUCHERRY 2010 By touching electric wires Female 60+ 0
234843 PUDUCHERRY 2010 Self-employed (Business activity) Male 15-29 3
234844 PUDUCHERRY 2010 Self-employed (Business activity) Male 60+ 0
234845 PUDUCHERRY 2010 Service (Private) Male 45-59 2
234846 PUDUCHERRY 2010 Student Female 45-59 0

560 rows × 6 columns

In [2591]:
t_PD_2010 = df_st_PD_2010.loc[:,"Total"]

s10_45 = np.sum(t_PD_2010)
s10_45
Out[2591]:
2540
In [2592]:
df_st_PB_2010 = df_2010.loc[(df_2010["State"]=="PUNJAB")]

df_st_PB_2010
Out[2592]:
State Year Type Gender Age_group Total
160065 PUNJAB 2010 Bankruptcy or Sudden change in Economic Male 15-29 2
162240 PUNJAB 2010 Dowry Dispute Male 15-29 0
162241 PUNJAB 2010 Dowry Dispute Male 60+ 0
162242 PUNJAB 2010 Fall in Social Reputation Male 45-59 3
162243 PUNJAB 2010 Illness (Aids/STD) Male 0-14 0
... ... ... ... ... ... ...
235021 PUNJAB 2010 By Fire-Arms Female 60+ 0
235022 PUNJAB 2010 House Wife Male 0-14 0
235023 PUNJAB 2010 Public Sector Undertaking Female 15-29 0
235024 PUNJAB 2010 Service (Government) Male 0-14 0
235025 PUNJAB 2010 Service (Private) Male 45-59 7

566 rows × 6 columns

In [2593]:
t_PB_2010 = df_st_PB_2010.loc[:,"Total"]

s10_46 = np.sum(t_PB_2010)
s10_46
Out[2593]:
4600
In [2594]:
df_st_RJ_2010 = df_2010.loc[(df_2010["State"]=="RAJASTHAN")]

df_st_RJ_2010
Out[2594]:
State Year Type Gender Age_group Total
167049 RAJASTHAN 2010 Bankruptcy or Sudden change in Economic Female 15-29 0
167050 RAJASTHAN 2010 Divorce Female 30-44 0
167051 RAJASTHAN 2010 Failure in Examination Female 30-44 0
167052 RAJASTHAN 2010 Failure in Examination Male 60+ 0
167053 RAJASTHAN 2010 Illegitimate Pregnancy Female 60+ 0
... ... ... ... ... ... ...
235233 RAJASTHAN 2010 By touching electric wires Male 15-29 23
235234 RAJASTHAN 2010 Farming/Agriculture Activity Female 45-59 6
235235 RAJASTHAN 2010 Others Female 60+ 3
235236 RAJASTHAN 2010 Others Male 60+ 46
235237 RAJASTHAN 2010 Service (Private) Male 0-14 0

566 rows × 6 columns

In [2595]:
t_RJ_2010 = df_st_RJ_2010.loc[:,"Total"]

s10_47 = np.sum(t_RJ_2010)
s10_47
Out[2595]:
24600
In [2596]:
df_st_SM_2010 = df_2010.loc[(df_2010["State"]=="SIKKIM")]

df_st_SM_2010
Out[2596]:
State Year Type Gender Age_group Total
173256 SIKKIM 2010 Cancer Male 30-44 0
173257 SIKKIM 2010 Failure in Examination Female 15-29 0
173258 SIKKIM 2010 Fall in Social Reputation Female 60+ 0
173259 SIKKIM 2010 Illness (Aids/STD) Male 60+ 0
173260 SIKKIM 2010 Love Affairs Female 15-29 0
... ... ... ... ... ... ...
235478 SIKKIM 2010 Service (Private) Male 60+ 2
235479 SIKKIM 2010 Student Female 30-44 0
235480 SIKKIM 2010 Student Female 60+ 0
235481 SIKKIM 2010 Unemployed Male 30-44 12
235482 SIKKIM 2010 Unemployed Male 45-59 7

562 rows × 6 columns

In [2597]:
t_SM_2010 = df_st_SM_2010.loc[:,"Total"]

s10_48 = np.sum(t_SM_2010)
s10_48
Out[2597]:
1400
In [2598]:
df_st_TN_2010 = df_2010.loc[(df_2010["State"]=="TAMIL NADU")]

df_st_TN_2010
Out[2598]:
State Year Type Gender Age_group Total
177177 TAMIL NADU 2010 Causes Not known Female 45-59 75
177178 TAMIL NADU 2010 Illegitimate Pregnancy Male 60+ 0
177179 TAMIL NADU 2010 Not having Children(Barrenness/Impotency Female 30-44 22
177180 TAMIL NADU 2010 Professional/Career Problem Male 30-44 51
177181 TAMIL NADU 2010 Property Dispute Male 15-29 111
... ... ... ... ... ... ...
235688 TAMIL NADU 2010 By Jumping from (Other sites) Female 0-14 2
235689 TAMIL NADU 2010 Farming/Agriculture Activity Male 0-14 13
235690 TAMIL NADU 2010 Retired Person Male 45-59 35
235691 TAMIL NADU 2010 Unemployed Female 45-59 90
235692 TAMIL NADU 2010 Unemployed Male 60+ 169

566 rows × 6 columns

In [2599]:
t_TN_2010 = df_st_TN_2010.loc[:,"Total"]

s10_49 = np.sum(t_TN_2010)
s10_49
Out[2599]:
82805
In [2600]:
df_st_TP_2010 = df_2010.loc[(df_2010["State"]=="TRIPURA")]

df_st_TP_2010
Out[2600]:
State Year Type Gender Age_group Total
183449 TRIPURA 2010 Causes Not known Female 15-29 22
183450 TRIPURA 2010 Dowry Dispute Female 15-29 22
183451 TRIPURA 2010 Dowry Dispute Female 30-44 14
183452 TRIPURA 2010 Dowry Dispute Female 60+ 0
183453 TRIPURA 2010 Failure in Examination Female 15-29 1
... ... ... ... ... ... ...
235900 TRIPURA 2010 Professional Activity Male 0-14 0
235901 TRIPURA 2010 Public Sector Undertaking Male 0-14 0
235902 TRIPURA 2010 Self-employed (Business activity) Male 0-14 0
235903 TRIPURA 2010 Service (Government) Male 0-14 0
235904 TRIPURA 2010 Student Female 0-14 14

565 rows × 6 columns

In [2601]:
t_TP_2010 = df_st_TP_2010.loc[:,"Total"]

s10_50 = np.sum(t_TP_2010)
s10_50
Out[2601]:
3625
In [2602]:
df_st_UP_2010 = df_2010.loc[(df_2010["State"]=="UTTAR PRADESH")]

df_st_UP_2010
Out[2602]:
State Year Type Gender Age_group Total
187810 UTTAR PRADESH 2010 Death of Dear Person Male 30-44 0
187811 UTTAR PRADESH 2010 Family Problems Male 60+ 25
187812 UTTAR PRADESH 2010 Illegitimate Pregnancy Female 0-14 2
187813 UTTAR PRADESH 2010 Illegitimate Pregnancy Female 15-29 11
187814 UTTAR PRADESH 2010 Love Affairs Female 15-29 84
... ... ... ... ... ... ...
236092 UTTAR PRADESH 2010 Others Female 15-29 124
236093 UTTAR PRADESH 2010 Others Male 30-44 123
236094 UTTAR PRADESH 2010 Professional Activity Female 45-59 0
236095 UTTAR PRADESH 2010 Self-employed (Business activity) Female 30-44 2
236096 UTTAR PRADESH 2010 Self-employed (Business activity) Female 45-59 0

566 rows × 6 columns

In [2603]:
t_UP_2010 = df_st_UP_2010.loc[:,"Total"]

s10_51 = np.sum(t_UP_2010)
s10_51
Out[2603]:
18140
In [2604]:
df_st_UK_2010 = df_2010.loc[(df_2010["State"]=="UTTARAKHAND")]

df_st_UK_2010
Out[2604]:
State Year Type Gender Age_group Total
194616 UTTARAKHAND 2010 Bankruptcy or Sudden change in Economic Male 15-29 2
194617 UTTARAKHAND 2010 Divorce Female 45-59 0
194618 UTTARAKHAND 2010 Dowry Dispute Male 60+ 0
194619 UTTARAKHAND 2010 Illness (Aids/STD) Male 0-14 0
194620 UTTARAKHAND 2010 Illness (Aids/STD) Male 15-29 0
... ... ... ... ... ... ...
236318 UTTARAKHAND 2010 By Jumping from (Building) Female 30-44 0
236319 UTTARAKHAND 2010 By Jumping from (Other sites) Female 45-59 0
236320 UTTARAKHAND 2010 House Wife Male 15-29 0
236321 UTTARAKHAND 2010 Professional Activity Female 15-29 0
236322 UTTARAKHAND 2010 Public Sector Undertaking Female 60+ 0

563 rows × 6 columns

In [2605]:
t_UK_2010 = df_st_UK_2010.loc[:,"Total"]

s10_52 = np.sum(t_UK_2010)
s10_52
Out[2605]:
1402
In [2606]:
df_st_WB_2010 = df_2010.loc[(df_2010["State"]=="WEST BENGAL")]

df_st_WB_2010
Out[2606]:
State Year Type Gender Age_group Total
198458 WEST BENGAL 2010 Bankruptcy or Sudden change in Economic Female 45-59 10
198459 WEST BENGAL 2010 Family Problems Female 30-44 487
198460 WEST BENGAL 2010 Others Male 30-44 546
198461 WEST BENGAL 2010 Physical Abuse (Rape/Incest Etc.) Female 15-29 4
198462 WEST BENGAL 2010 Suspected/Illicit Relation Male 45-59 12
... ... ... ... ... ... ...
236547 WEST BENGAL 2010 Retired Person Female 30-44 0
236548 WEST BENGAL 2010 Service (Private) Female 30-44 69
236549 WEST BENGAL 2010 Unemployed Female 60+ 1
236550 WEST BENGAL 2010 Unemployed Male 30-44 382
236551 WEST BENGAL 2010 Never Married Female 0-100+ 1766

566 rows × 6 columns

In [2607]:
t_WB_2010 = df_st_WB_2010.loc[:,"Total"]

s10_53 = np.sum(t_WB_2010)
s10_53
Out[2607]:
80185
In [2608]:
t_ANm_2010 = np.sum(df_st_AN_2010.where(df_st_AN_2010["Gender"]=="Male")["Total"])
t_ANm_2010
Out[2608]:
560.0
In [2609]:
t_ANfm_2010 = np.sum(df_st_AN_2010.where(df_st_AN_2010["Gender"]=="Female")["Total"])
t_ANfm_2010
Out[2609]:
220.0
In [2610]:
t_APm_2010 = np.sum(df_st_AP_2010.where(df_st_AP_2010["Gender"]=="Male")["Total"])
t_APm_2010
Out[2610]:
54735.0
In [2611]:
t_APfm_2010 = np.sum(df_st_AP_2010.where(df_st_AP_2010["Gender"]=="Female")["Total"])
t_APfm_2010
Out[2611]:
24770.0
In [2612]:
t_ARPm_2010 = np.sum(df_st_ARP_2010.where(df_st_ARP_2010["Gender"]=="Male")["Total"])
t_ARPm_2010
Out[2612]:
455.0
In [2613]:
t_ARPfm_2010 = np.sum(df_st_ARP_2010.where(df_st_ARP_2010["Gender"]=="Female")["Total"])
t_ARPfm_2010
Out[2613]:
200.0
In [2614]:
t_ASm_2010 = np.sum(df_st_AS_2010.where(df_st_AS_2010["Gender"]=="Male")["Total"])
t_ASm_2010
Out[2614]:
10130.0
In [2615]:
t_ASfm_2010 = np.sum(df_st_AS_2010.where(df_st_AS_2010["Gender"]=="Female")["Total"])
t_ASfm_2010
Out[2615]:
4835.0
In [2616]:
t_BHm_2010 = np.sum(df_st_BH_2010.where(df_st_BH_2010["Gender"]=="Male")["Total"])
t_BHm_2010
Out[2616]:
3560.0
In [2617]:
t_BHfm_2010 = np.sum(df_st_BH_2010.where(df_st_BH_2010["Gender"]=="Female")["Total"])
t_BHfm_2010
Out[2617]:
2570.0
In [2618]:
t_CHm_2010 = np.sum(df_st_CH_2010.where(df_st_CH_2010["Gender"]=="Male")["Total"])
t_CHm_2010
Out[2618]:
155.0
In [2619]:
t_CHfm_2010 = np.sum(df_st_CH_2010.where(df_st_CH_2010["Gender"]=="Female")["Total"])
t_CHfm_2010
Out[2619]:
200.0
In [2620]:
t_CTm_2010 = np.sum(df_st_CT_2010.where(df_st_CT_2010["Gender"]=="Male")["Total"])
t_CTm_2010
Out[2620]:
22725.0
In [2621]:
t_CTfm_2010 = np.sum(df_st_CT_2010.where(df_st_CT_2010["Gender"]=="Female")["Total"])
t_CTfm_2010
Out[2621]:
9838.0
In [2622]:
t_DNm_2010 = np.sum(df_st_DN_2010.where(df_st_DN_2010["Gender"]=="Male")["Total"])
t_DNm_2010
Out[2622]:
185.0
In [2623]:
t_DNfm_2010 = np.sum(df_st_DN_2010.where(df_st_DN_2010["Gender"]=="Female")["Total"])
t_DNfm_2010
Out[2623]:
130.0
In [2624]:
t_DDm_2010 = np.sum(df_st_DD_2010.where(df_st_DD_2010["Gender"]=="Male")["Total"])
t_DDm_2010
Out[2624]:
95.0
In [2625]:
t_DDfm_2010 = np.sum(df_st_DD_2010.where(df_st_DD_2010["Gender"]=="Female")["Total"])
t_DDfm_2010
Out[2625]:
60.0
In [2626]:
t_DLm_2010 = np.sum(df_st_DL_2010.where(df_st_DL_2010["Gender"]=="Male")["Total"])
t_DLm_2010
Out[2626]:
4805.0
In [2627]:
t_DLfm_2010 = np.sum(df_st_DL_2010.where(df_st_DL_2010["Gender"]=="Female")["Total"])
t_DLfm_2010
Out[2627]:
2908.0
In [2628]:
t_GOAm_2010 = np.sum(df_st_GOA_2010.where(df_st_GOA_2010["Gender"]=="Male")["Total"])
t_GOAm_2010
Out[2628]:
1180.0
In [2629]:
t_GOAfm_2010 = np.sum(df_st_GOA_2010.where(df_st_GOA_2010["Gender"]=="Female")["Total"])
t_GOAfm_2010
Out[2629]:
430.0
In [2630]:
t_GJm_2010 = np.sum(df_st_GJ_2010.where(df_st_GJ_2010["Gender"]=="Male")["Total"])
t_GJm_2010
Out[2630]:
19065.0
In [2631]:
t_GJfm_2010 = np.sum(df_st_GJ_2010.where(df_st_GJ_2010["Gender"]=="Female")["Total"])
t_GJfm_2010
Out[2631]:
11970.0
In [2632]:
t_HRm_2010 = np.sum(df_st_HR_2010.where(df_st_HR_2010["Gender"]=="Male")["Total"])
t_HRm_2010
Out[2632]:
10890.0
In [2633]:
t_HRfm_2010 = np.sum(df_st_HR_2010.where(df_st_HR_2010["Gender"]=="Female")["Total"])
t_HRfm_2010
Out[2633]:
3580.0
In [2634]:
t_HPm_2010 = np.sum(df_st_HP_2010.where(df_st_HP_2010["Gender"]=="Male")["Total"])
t_HPm_2010
Out[2634]:
1740.0
In [2635]:
t_HPfm_2010 = np.sum(df_st_HP_2010.where(df_st_HP_2010["Gender"]=="Female")["Total"])
t_HPfm_2010
Out[2635]:
963.0
In [2636]:
t_JKm_2010 = np.sum(df_st_JK_2010.where(df_st_JK_2010["Gender"]=="Male")["Total"])
t_JKm_2010
Out[2636]:
610.0
In [2637]:
t_JKfm_2010 = np.sum(df_st_JK_2010.where(df_st_JK_2010["Gender"]=="Female")["Total"])
t_JKfm_2010
Out[2637]:
685.0
In [2638]:
t_JHm_2010 = np.sum(df_st_JH_2010.where(df_st_JH_2010["Gender"]=="Male")["Total"])
t_JHm_2010
Out[2638]:
3973.0
In [2639]:
t_JHfm_2010 = np.sum(df_st_JH_2010.where(df_st_JH_2010["Gender"]=="Female")["Total"])
t_JHfm_2010
Out[2639]:
2185.0
In [2640]:
t_KNm_2010 = np.sum(df_st_KN_2010.where(df_st_KN_2010["Gender"]=="Male")["Total"])
t_KNm_2010
Out[2640]:
42035.0
In [2641]:
t_KNfm_2010 = np.sum(df_st_KN_2010.where(df_st_KN_2010["Gender"]=="Female")["Total"])
t_KNfm_2010
Out[2641]:
21220.0
In [2642]:
t_KERm_2010 = np.sum(df_st_KER_2010.where(df_st_KER_2010["Gender"]=="Male")["Total"])
t_KERm_2010
Out[2642]:
31730.0
In [2643]:
t_KERfm_2010 = np.sum(df_st_KER_2010.where(df_st_KER_2010["Gender"]=="Female")["Total"])
t_KERfm_2010
Out[2643]:
11200.0
In [2644]:
t_LDm_2010 = np.sum(df_st_LD_2010.where(df_st_LD_2010["Gender"]=="Male")["Total"])
t_LDm_2010
Out[2644]:
0.0
In [2645]:
t_LDfm_2010 = np.sum(df_st_LD_2010.where(df_st_LD_2010["Gender"]=="Female")["Total"])
t_LDfm_2010
Out[2645]:
5.0
In [2646]:
t_MPm_2010 = np.sum(df_st_MP_2010.where(df_st_MP_2010["Gender"]=="Male")["Total"])
t_MPm_2010
Out[2646]:
25435.0
In [2647]:
t_MPfm_2010 = np.sum(df_st_MP_2010.where(df_st_MP_2010["Gender"]=="Female")["Total"])
t_MPfm_2010
Out[2647]:
19580.0
In [2648]:
t_MHm_2010 = np.sum(df_st_MH_2010.where(df_st_MH_2010["Gender"]=="Male")["Total"])
t_MHm_2010
Out[2648]:
54290.0
In [2649]:
t_MHfm_2010 = np.sum(df_st_MH_2010.where(df_st_MH_2010["Gender"]=="Female")["Total"])
t_MHfm_2010
Out[2649]:
25290.0
In [2650]:
t_MNm_2010 = np.sum(df_st_MN_2010.where(df_st_MN_2010["Gender"]=="Male")["Total"])
t_MNm_2010
Out[2650]:
120.0
In [2651]:
t_MNfm_2010 = np.sum(df_st_MN_2010.where(df_st_MN_2010["Gender"]=="Female")["Total"])
t_MNfm_2010
Out[2651]:
65.0
In [2652]:
t_MGm_2010 = np.sum(df_st_MG_2010.where(df_st_MG_2010["Gender"]=="Male")["Total"])
t_MGm_2010
Out[2652]:
399.0
In [2653]:
t_MGfm_2010 = np.sum(df_st_MG_2010.where(df_st_MG_2010["Gender"]=="Female")["Total"])
t_MGfm_2010
Out[2653]:
138.0
In [2654]:
t_MZm_2010 = np.sum(df_st_MZ_2010.where(df_st_MZ_2010["Gender"]=="Male")["Total"])
t_MZm_2010
Out[2654]:
335.0
In [2655]:
t_MZfm_2010 = np.sum(df_st_MZ_2010.where(df_st_MZ_2010["Gender"]=="Female")["Total"])
t_MZfm_2010
Out[2655]:
45.0
In [2656]:
t_NGm_2010 = np.sum(df_st_NG_2010.where(df_st_NG_2010["Gender"]=="Male")["Total"])
t_NGm_2010
Out[2656]:
55.0
In [2657]:
t_NGfm_2010 = np.sum(df_st_NG_2010.where(df_st_NG_2010["Gender"]=="Female")["Total"])
t_MGfm_2010
Out[2657]:
138.0
In [2658]:
t_ODm_2010 = np.sum(df_st_OD_2010.where(df_st_OD_2010["Gender"]=="Male")["Total"])
t_ODm_2010
Out[2658]:
12150.0
In [2659]:
t_ODfm_2010 = np.sum(df_st_OD_2010.where(df_st_OD_2010["Gender"]=="Female")["Total"])
t_ODfm_2010
Out[2659]:
9125.0
In [2660]:
t_PDm_2010 = np.sum(df_st_PD_2010.where(df_st_PD_2010["Gender"]=="Male")["Total"])
t_PDm_2010
Out[2660]:
1665.0
In [2661]:
t_PDfm_2010 = np.sum(df_st_PD_2010.where(df_st_PD_2010["Gender"]=="Female")["Total"])
t_PDfm_2010
Out[2661]:
875.0
In [2662]:
t_PBm_2010 = np.sum(df_st_PB_2010.where(df_st_PB_2010["Gender"]=="Male")["Total"])
t_PBm_2010
Out[2662]:
3595.0
In [2663]:
t_PBfm_2010 = np.sum(df_st_PB_2010.where(df_st_PB_2010["Gender"]=="Female")["Total"])
t_PBfm_2010
Out[2663]:
1005.0
In [2664]:
t_RJm_2010 = np.sum(df_st_RJ_2010.where(df_st_RJ_2010["Gender"]=="Male")["Total"])
t_RJm_2010
Out[2664]:
16825.0
In [2665]:
t_RJfm_2010 = np.sum(df_st_RJ_2010.where(df_st_RJ_2010["Gender"]=="Female")["Total"])
t_RJfm_2010
Out[2665]:
7775.0
In [3114]:
t_SMm_2010 = np.sum(df_st_SM_2010.where(df_st_SM_2010["Gender"]=="Male")["Total"])
t_SMm_2010
Out[3114]:
1175.0
In [3115]:
t_SMfm_2010 = np.sum(df_st_SM_2010.where(df_st_SM_2010["Gender"]=="Female")["Total"])
t_SMfm_2010
Out[3115]:
225.0
In [3116]:
t_TNm_2010 = np.sum(df_st_TN_2010.where(df_st_TN_2010["Gender"]=="Male")["Total"])
t_TNm_2010
Out[3116]:
52760.0
In [3117]:
t_TNfm_2010 = np.sum(df_st_TN_2010.where(df_st_TN_2010["Gender"]=="Female")["Total"])
t_TNfm_2010
Out[3117]:
30045.0
In [3118]:
t_TPm_2010 = np.sum(df_st_TP_2010.where(df_st_TP_2010["Gender"]=="Male")["Total"])
t_TPm_2010
Out[3118]:
2205.0
In [3119]:
t_TPfm_2010 = np.sum(df_st_TP_2010.where(df_st_TP_2010["Gender"]=="Female")["Total"])
t_TPfm_2010
Out[3119]:
1420.0
In [3120]:
t_UPm_2010 = np.sum(df_st_UP_2010.where(df_st_UP_2010["Gender"]=="Male")["Total"])
t_UPm_2010
Out[3120]:
8935.0
In [3121]:
t_UPfm_2010 = np.sum(df_st_UP_2010.where(df_st_UP_2010["Gender"]=="Female")["Total"])
t_UPfm_2010
Out[3121]:
9205.0
In [3122]:
t_UKm_2010 = np.sum(df_st_UK_2010.where(df_st_UK_2010["Gender"]=="Male")["Total"])
t_UKm_2010
Out[3122]:
820.0
In [3123]:
t_UKfm_2010 = np.sum(df_st_UK_2010.where(df_st_UK_2010["Gender"]=="Female")["Total"])
t_UKfm_2010
Out[3123]:
582.0
In [3124]:
t_WBm_2010 = np.sum(df_st_WB_2010.where(df_st_WB_2010["Gender"]=="Male")["Total"])
t_WBm_2010
Out[3124]:
46505.0
In [3125]:
t_WBfm_2010 = np.sum(df_st_WB_2010.where(df_st_WB_2010["Gender"]=="Female")["Total"])
t_WBfm_2010
Out[3125]:
33680.0
In [3126]:
l_2010=list(df_2010.loc[:,"Type"].unique())
l_2010.sort()
print(l_2010,end=" ")
['Bankruptcy or Sudden change in Economic', 'By Consuming Insecticides', 'By Consuming Other Poison', 'By Drowning', 'By Fire-Arms', 'By Fire/Self Immolation', 'By Hanging', 'By Jumping from (Building)', 'By Jumping from (Other sites)', 'By Jumping off Moving Vehicles/Trains', 'By Machine', 'By Over Alcoholism', 'By Overdose of sleeping pills', 'By Self Infliction of injury', 'By coming under running vehicles/trains', 'By touching electric wires', 'Cancellation/Non-Settlement of Marriage', 'Cancer', 'Causes Not known', 'Death of Dear Person', 'Diploma', 'Divorce', 'Divorcee', 'Dowry Dispute', 'Drug Abuse/Addiction', 'Failure in Examination', 'Fall in Social Reputation', 'Family Problems', 'Farming/Agriculture Activity', 'Graduate', 'House Wife', 'Hr. Secondary/Intermediate/Pre-Universit', 'Ideological Causes/Hero Worshipping', 'Illegitimate Pregnancy', 'Illness (Aids/STD)', 'Insanity/Mental Illness', 'Love Affairs', 'Married', 'Matriculate/Secondary', 'Middle', 'Never Married', 'No Education', 'Not having Children(Barrenness/Impotency', 'Other Prolonged Illness', 'Others', 'Paralysis', 'Physical Abuse (Rape/Incest Etc.)', 'Post Graduate and Above', 'Poverty', 'Primary', 'Professional Activity', 'Professional/Career Problem', 'Property Dispute', 'Public Sector Undertaking', 'Retired Person', 'Self-employed (Business activity)', 'Seperated', 'Service (Government)', 'Service (Private)', 'Student', 'Suspected/Illicit Relation', 'Unemployed', 'Unemployment', 'Widowed/Widower'] 
In [3127]:
cause_l_2010=[]
for i in l_2010:
    rough= np.sum(df_2010.where(df_2010["Type"]==i)["Total"])
    cause_l_2010.append(rough)

print(cause_l_2010,end=" ")
[2709.0, 25288.0, 19247.0, 8409.0, 666.0, 11885.0, 42266.0, 795.0, 875.0, 743.0, 177.0, 1490.0, 589.0, 836.0, 4204.0, 1150.0, 1027.0, 828.0, 22685.0, 1035.0, 1349.0, 290.0, 1517.0, 3093.0, 3343.0, 2479.0, 1322.0, 31856.0, 15964.0, 3264.0, 25058.0, 11519.0, 102.0, 153.0, 545.0, 9465.0, 4166.0, 93207.0, 24581.0, 30557.0, 30810.0, 26702.0, 666.0, 17044.0, 86158.0, 582.0, 301.0, 1197.0, 3047.0, 35430.0, 4059.0, 966.0, 1899.0, 2900.0, 898.0, 7154.0, 3917.0, 1842.0, 10502.0, 7379.0, 1336.0, 10033.0, 2222.0, 5148.0] 
In [3128]:
x1_2010 = set(df_2010.loc[:,"State"])
x1_2010
len(x1_2010)
Out[3128]:
35
In [3129]:
cause_df_2010 = pd.DataFrame(cause_l_2010,l_2010)
cause_df_2010.reset_index()
c:\program files\python\python38-32\lib\site-packages\IPython\core\displayhook.py:275: UserWarning: Output cache limit (currently 1000 entries) hit.
Flushing oldest 200 entries.
  warn('Output cache limit (currently {sz} entries) hit.\n'
Out[3129]:
index 0
0 Bankruptcy or Sudden change in Economic 2709.0
1 By Consuming Insecticides 25288.0
2 By Consuming Other Poison 19247.0
3 By Drowning 8409.0
4 By Fire-Arms 666.0
... ... ...
59 Student 7379.0
60 Suspected/Illicit Relation 1336.0
61 Unemployed 10033.0
62 Unemployment 2222.0
63 Widowed/Widower 5148.0

64 rows × 2 columns

In [3130]:
cause_df_2010.plot.bar(stacked=True,figsize=(50,20))
plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("Causes",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths due to Different Causes in 2010",fontsize=55)
plt.legend(["Death Count"], prop={"size":30})
Out[3130]:
<matplotlib.legend.Legend at 0x12da8e68>
In [3131]:
s_2010=list(df_2010.loc[:,"State"].unique())
s_2010.sort()
print(s_2010,end=" ")
['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH', 'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR', 'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA', 'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA', 'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'] 
In [3132]:
state_s_2010 = [s10_19,s10_20,s10_21,s10_22,s10_23,s10_24,s10_25,s10_26,s10_27,s10_28,s10_29,s10_30,s10_31,s10_32,s10_33,s10_34,
           s10_35,s10_36,s10_37,s10_38,s10_39,s10_40,s10_41,s10_42,s10_43,s10_44,s10_45,s10_46,s10_47,s10_48,s10_49,s10_50,
           s10_51,s10_52,s10_53]
print(state_s_2010,end=" ")
[780, 79505, 655, 14965, 6130, 355, 32563, 315, 155, 7713, 1610, 31035, 14470, 2703, 1295, 6158, 63255, 42930, 5, 45015, 79580, 185, 537, 185, 60, 21275, 2540, 4600, 24600, 1400, 82805, 3625, 18140, 1402, 80185] 
In [3133]:
state_m_2010=[t_ANm_2010, t_APm_2010, t_ARPm_2010, t_ASm_2010, t_BHm_2010, t_CHm_2010, t_CTm_2010, t_DNm_2010,
             t_DDm_2010, t_DLm_2010, t_GOAm_2010, t_GJm_2010, t_HRm_2010, t_HPm_2010,t_JKm_2010, t_JHm_2010,
             t_KNm_2010, t_KERm_2010, t_LDm_2010,t_MPm_2010,t_MHm_2010,t_MNm_2010,t_MGm_2010,t_MZm_2010,
             t_NGm_2010, t_ODm_2010, t_PDm_2010,t_PBm_2010,t_RJm_2010,t_SMm_2010,t_TNm_2010,t_TPm_2010,
             t_UPm_2010, t_UKm_2010, t_WBm_2010]
print(state_m_2010,end=" ")
[560.0, 54735.0, 455.0, 10130.0, 3560.0, 155.0, 22725.0, 185.0, 95.0, 4805.0, 1180.0, 19065.0, 10890.0, 1740.0, 610.0, 3973.0, 42035.0, 31730.0, 0.0, 25435.0, 54290.0, 120.0, 399.0, 335.0, 55.0, 12150.0, 1665.0, 3595.0, 16825.0, 1175.0, 52760.0, 2205.0, 8935.0, 820.0, 46505.0] 
In [3134]:
state_fm_2010=[t_ANfm_2010, t_APfm_2010, t_ARPfm_2010, t_ASfm_2010, t_BHfm_2010, t_CHfm_2010, t_CTfm_2010, t_DNfm_2010,
             t_DDfm_2010, t_DLfm_2010, t_GOAfm_2010, t_GJfm_2010, t_HRfm_2010, t_HPfm_2010,t_JKfm_2010, t_JHfm_2010,
             t_KNfm_2010, t_KERfm_2010, t_LDfm_2010,t_MPfm_2010,t_MHfm_2010,t_MNfm_2010,t_MGfm_2010,t_MZfm_2010,
             t_NGfm_2010, t_ODfm_2010, t_PDfm_2010,t_PBfm_2010,t_RJfm_2010,t_SMfm_2010,t_TNfm_2010,t_TPfm_2010,
             t_UPfm_2010, t_UKfm_2010, t_WBfm_2010]
print(state_fm_2010,end=" ")
[220.0, 24770.0, 200.0, 4835.0, 2570.0, 200.0, 9838.0, 130.0, 60.0, 2908.0, 430.0, 11970.0, 3580.0, 963.0, 685.0, 2185.0, 21220.0, 11200.0, 5.0, 19580.0, 25290.0, 65.0, 138.0, 45.0, 5.0, 9125.0, 875.0, 1005.0, 7775.0, 225.0, 30045.0, 1420.0, 9205.0, 582.0, 33680.0] 
In [3135]:
df_state_2010 = {
    
    "State":['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH',
             'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR',
             'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA',
             'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA',
             'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'],
                   
    "Total":[s10_19,s10_20,s10_21,s10_22,s10_23,s10_24,s10_25,s10_26,s10_27,s10_28,s10_29,s10_30,s10_31,s10_32,s10_33,s10_34,
           s10_35,s10_36,s10_37,s10_38,s10_39,s10_40,s10_41,s10_42,s10_43,s10_44,s10_45,s10_46,s10_47,s10_48,s10_49,s10_50,
           s10_51,s10_52,s10_53],
       
    "Male":[t_ANm_2010, t_APm_2010, t_ARPm_2010, t_ASm_2010, t_BHm_2010, t_CHm_2010, t_CTm_2010, t_DNm_2010,
             t_DDm_2010, t_DLm_2010, t_GOAm_2010, t_GJm_2010, t_HRm_2010, t_HPm_2010,t_JKm_2010, t_JHm_2010,
             t_KNm_2010, t_KERm_2010, t_LDm_2010,t_MPm_2010,t_MHm_2010,t_MNm_2010,t_MGm_2010,t_MZm_2010,
             t_NGm_2010, t_ODm_2010, t_PDm_2010,t_PBm_2010,t_RJm_2010,t_SMm_2010,t_TNm_2010,t_TPm_2010,
             t_UPm_2010, t_UKm_2010, t_WBm_2010],
                 
    "Female":[t_ANfm_2010, t_APfm_2010, t_ARPfm_2010, t_ASfm_2010, t_BHfm_2010, t_CHfm_2010, t_CTfm_2010, t_DNfm_2010,
             t_DDfm_2010, t_DLfm_2010, t_GOAfm_2010, t_GJfm_2010, t_HRfm_2010, t_HPfm_2010,t_JKfm_2010, t_JHfm_2010,
             t_KNfm_2010, t_KERfm_2010, t_LDfm_2010,t_MPfm_2010,t_MHfm_2010,t_MNfm_2010,t_MGfm_2010,t_MZfm_2010,
             t_NGfm_2010, t_ODfm_2010, t_PDfm_2010,t_PBfm_2010,t_RJfm_2010,t_SMfm_2010,t_TNfm_2010,t_TPfm_2010,
             t_UPfm_2010, t_UKfm_2010, t_WBfm_2010]
                  

}

df_All_st_2010 = pd.DataFrame(df_state_2010)
df_All_st_2010
Out[3135]:
State Total Male Female
0 A & N ISLANDS 780 560.0 220.0
1 ANDHRA PRADESH 79505 54735.0 24770.0
2 ARUNACHAL PRADESH 655 455.0 200.0
3 ASSAM 14965 10130.0 4835.0
4 BIHAR 6130 3560.0 2570.0
5 CHANDIGARH 355 155.0 200.0
6 CHHATTISGARH 32563 22725.0 9838.0
7 D & N HAVELI 315 185.0 130.0
8 DAMAN & DIU 155 95.0 60.0
9 DELHI (UT) 7713 4805.0 2908.0
10 GOA 1610 1180.0 430.0
11 GUJARAT 31035 19065.0 11970.0
12 HARYANA 14470 10890.0 3580.0
13 HIMACHAL PRADESH 2703 1740.0 963.0
14 JAMMU & KASHMIR 1295 610.0 685.0
15 JHARKHAND 6158 3973.0 2185.0
16 KARNATAKA 63255 42035.0 21220.0
17 KERALA 42930 31730.0 11200.0
18 LAKSHADWEEP 5 0.0 5.0
19 MADHYA PRADESH 45015 25435.0 19580.0
20 MAHARASHTRA 79580 54290.0 25290.0
21 MANIPUR 185 120.0 65.0
22 MEGHALAYA 537 399.0 138.0
23 MIZORAM 185 335.0 45.0
24 NAGALAND 60 55.0 5.0
25 ODISHA 21275 12150.0 9125.0
26 PUDUCHERRY 2540 1665.0 875.0
27 PUNJAB 4600 3595.0 1005.0
28 RAJASTHAN 24600 16825.0 7775.0
29 SIKKIM 1400 1175.0 225.0
30 TAMIL NADU 82805 52760.0 30045.0
31 TRIPURA 3625 2205.0 1420.0
32 UTTAR PRADESH 18140 8935.0 9205.0
33 UTTARAKHAND 1402 820.0 582.0
34 WEST BENGAL 80185 46505.0 33680.0
In [3136]:
pivot_2010 = pd.pivot_table(df_All_st_2010, values=None, index='State', columns=None,
                       fill_value=None, margins=False, dropna=True, margins_name='All', observed=False)

pivot_2010
Out[3136]:
Female Male Total
State
A & N ISLANDS 220.0 560.0 780
ANDHRA PRADESH 24770.0 54735.0 79505
ARUNACHAL PRADESH 200.0 455.0 655
ASSAM 4835.0 10130.0 14965
BIHAR 2570.0 3560.0 6130
CHANDIGARH 200.0 155.0 355
CHHATTISGARH 9838.0 22725.0 32563
D & N HAVELI 130.0 185.0 315
DAMAN & DIU 60.0 95.0 155
DELHI (UT) 2908.0 4805.0 7713
GOA 430.0 1180.0 1610
GUJARAT 11970.0 19065.0 31035
HARYANA 3580.0 10890.0 14470
HIMACHAL PRADESH 963.0 1740.0 2703
JAMMU & KASHMIR 685.0 610.0 1295
JHARKHAND 2185.0 3973.0 6158
KARNATAKA 21220.0 42035.0 63255
KERALA 11200.0 31730.0 42930
LAKSHADWEEP 5.0 0.0 5
MADHYA PRADESH 19580.0 25435.0 45015
MAHARASHTRA 25290.0 54290.0 79580
MANIPUR 65.0 120.0 185
MEGHALAYA 138.0 399.0 537
MIZORAM 45.0 335.0 185
NAGALAND 5.0 55.0 60
ODISHA 9125.0 12150.0 21275
PUDUCHERRY 875.0 1665.0 2540
PUNJAB 1005.0 3595.0 4600
RAJASTHAN 7775.0 16825.0 24600
SIKKIM 225.0 1175.0 1400
TAMIL NADU 30045.0 52760.0 82805
TRIPURA 1420.0 2205.0 3625
UTTAR PRADESH 9205.0 8935.0 18140
UTTARAKHAND 582.0 820.0 1402
WEST BENGAL 33680.0 46505.0 80185
In [3137]:
pivot_2010.plot(kind='bar',figsize=(60,30))

plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("States",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths of Males And Females In Different State",fontsize=55)
plt.legend(["Female","Male","Total"], prop={"size":30})

plt.show
Out[3137]:
<function matplotlib.pyplot.show(close=None, block=None)>
In [3138]:
cause_l_percent_2010=[]
for i in cause_l_2010:
    p=i/np.sum(cause_l_2010)
    avg_2010_cause=p*100
    cause_l_percent_2010.append(avg_2010_cause)

print(cause_l_percent_2010,end=" ")
[0.40257026775603855, 3.7579169180563685, 2.8601956232929027, 1.2496173427687443, 0.09897076350148457, 1.7661674537764924, 6.280928363594214, 0.1181407762517721, 0.13002915625195044, 0.1104133292516562, 0.026303040750394545, 0.22142107750332132, 0.08752819775131293, 0.12423357100186351, 0.6247343690093711, 0.17089546250256343, 0.15261707825228926, 0.12304473300184568, 3.371098753800567, 0.15380591625230708, 0.20046780775300702, 0.04309537750064643, 0.22543340575338153, 0.45963449175689447, 0.49678567925745176, 0.3683911752555259, 0.19645547950294684, 4.73395291607101, 2.372326229035585, 0.4850459040072757, 3.7237378255558564, 1.7117781152756768, 0.015157684500227366, 0.022736526750341046, 0.08098958875121484, 1.4065439587710982, 0.6190873885092864, 13.851002933457766, 3.6528533598047925, 4.540915345818114, 4.578512347568678, 3.968044034559521, 0.09897076350148457, 2.5328193590379926, 12.803488050692053, 0.08648796450129732, 0.044730029750670953, 0.1778798857526682, 0.45279867325679196, 5.265066292578976, 0.6031866802590478, 0.1435521885021533, 0.28220042025423303, 0.43095377500646426, 0.13344706550200172, 1.0631183815159468, 0.5820848057587312, 0.27372994950410595, 1.5606470845234097, 1.0965544502664484, 0.19853594600297803, 1.4909514567723643, 0.330199754504953, 0.7650172530114753] 
In [3139]:
np.max(cause_l_percent_2010) #Married
Out[3139]:
13.851002933457766
In [3140]:
np.min(cause_l_percent_2010)  #Ideological Causes/Hero Worshipping
Out[3140]:
0.015157684500227366
In [3141]:
state_s_2010_percent=[]
tot=np.sum(state_s_2010)
for i in state_s_2010:
    xy=i/tot
    avg_state_2010=xy*100
    state_s_2010_percent.append(avg_state_2010)

print(state_s_2010_percent,end=" ")
[0.11594530354629116, 11.818245331343434, 0.0973643254138727, 2.2245147020131375, 0.911211167613801, 0.05276997789606841, 4.840419127407538, 0.046824064893694506, 0.023040412884198887, 1.1465206746827483, 0.23932299834554968, 4.613285250716854, 2.15093402860876, 0.4017950711354167, 0.1924989334518552, 0.9153733067154628, 9.402718174129035, 6.381451129797794, 0.0007432391252967382, 6.691381845046535, 11.829393918222886, 0.027499847635979312, 0.07982388205686967, 0.027499847635979312, 0.008918869503560859, 3.162482478137621, 0.37756547565074305, 0.6837799952729992, 3.6567364964599522, 0.20810695508308671, 12.308783154039283, 0.5388483658401352, 2.696471546576566, 0.2084042507332054, 11.91932585238379] 
In [3142]:
np.max(state_s_2010_percent) #Maharashtra
Out[3142]:
12.308783154039283
In [3143]:
np.min(state_s_2010_percent)  #Lakshdweep
Out[3143]:
0.0007432391252967382
In [3144]:
l_age_grp_2010=[s10_4,s10_5,s10_6,s10_7,s10_8,s10_54]
l_age_grp_2010
Out[3144]:
[9390, 142867, 134534, 83618, 33319, 269198]
In [3145]:
l_age_grp_2010_percent=[]
for i in l_age_grp_2010:
    yz=i/s10_1
    avg_2010_age_grp=yz*100
    l_age_grp_2010_percent.append(avg_2010_age_grp)
l_age_grp_2010_percent
Out[3145]:
[1.395398602520931,
 21.23071481856846,
 19.992391436799885,
 12.426031985686391,
 4.951361665324271,
 40.004101491100066]
In [3146]:
np.max(l_age_grp_2010_percent)  #0-100+
Out[3146]:
40.004101491100066
In [3147]:
np.min(l_age_grp_2010_percent)  #0-14
Out[3147]:
1.395398602520931
In [3148]:
total_male_percent_2010= (s10_2/s10_1)*100
total_male_percent_2010
Out[3148]:
64.77636471172164
In [3149]:
total_female_percent_2010= (s10_3/s10_1)*100
total_female_percent_2010
Out[3149]:
35.22363528827835
In [ ]:
 

2011

In [3150]:
df_2011 = suicide_df.loc[(suicide_df["Year"]==2011)]

df_2011
Out[3150]:
State Year Type Gender Age_group Total
2542 A & N ISLANDS 2011 Cancellation/Non-Settlement of Marriage Female 0-14 0
2543 A & N ISLANDS 2011 Dowry Dispute Male 45-59 0
2544 A & N ISLANDS 2011 Failure in Examination Male 0-14 0
2545 A & N ISLANDS 2011 Family Problems Female 45-59 1
2546 A & N ISLANDS 2011 Illegitimate Pregnancy Male 15-29 0
... ... ... ... ... ... ...
236566 WEST BENGAL 2011 Others Male 60+ 195
236567 WEST BENGAL 2011 Public Sector Undertaking Female 30-44 61
236568 WEST BENGAL 2011 Public Sector Undertaking Male 30-44 245
236569 WEST BENGAL 2011 Service (Government) Male 60+ 1
236570 WEST BENGAL 2011 Unemployed Female 60+ 6

19728 rows × 6 columns

In [3151]:
t2011_dcount = df_2011.loc[:,"Total"]

s11_1 = np.sum(t2011_dcount)

s11_1
Out[3151]:
677159
In [3152]:
male_2011 = df_2011.loc[(df_2011["Gender"]=="Male")]

male_2011
Out[3152]:
State Year Type Gender Age_group Total
2543 A & N ISLANDS 2011 Dowry Dispute Male 45-59 0
2544 A & N ISLANDS 2011 Failure in Examination Male 0-14 0
2546 A & N ISLANDS 2011 Illegitimate Pregnancy Male 15-29 0
2547 A & N ISLANDS 2011 Insanity/Mental Illness Male 15-29 1
2548 A & N ISLANDS 2011 Others Male 15-29 4
... ... ... ... ... ... ...
236564 WEST BENGAL 2011 By Jumping off Moving Vehicles/Trains Male 15-29 14
236565 WEST BENGAL 2011 Others Male 45-59 528
236566 WEST BENGAL 2011 Others Male 60+ 195
236568 WEST BENGAL 2011 Public Sector Undertaking Male 30-44 245
236569 WEST BENGAL 2011 Service (Government) Male 60+ 1

9876 rows × 6 columns

In [3153]:
m2011_count = male_2011.loc[:,"Total"]
s11_2 = np.sum(m2011_count)

s11_2
Out[3153]:
438455
In [3154]:
female_2011 = df_2011.loc[(df_2011["Gender"]=="Female")]

female_2011
Out[3154]:
State Year Type Gender Age_group Total
2542 A & N ISLANDS 2011 Cancellation/Non-Settlement of Marriage Female 0-14 0
2545 A & N ISLANDS 2011 Family Problems Female 45-59 1
2554 A & N ISLANDS 2011 By Fire-Arms Female 15-29 0
2555 A & N ISLANDS 2011 Professional Activity Female 0-14 0
2769 A & N ISLANDS 2011 Illness (Aids/STD) Female 30-44 0
... ... ... ... ... ... ...
236560 WEST BENGAL 2011 Physical Abuse (Rape/Incest Etc.) Female 30-44 2
236561 WEST BENGAL 2011 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
236563 WEST BENGAL 2011 By Fire/Self Immolation Female 30-44 84
236567 WEST BENGAL 2011 Public Sector Undertaking Female 30-44 61
236570 WEST BENGAL 2011 Unemployed Female 60+ 6

9852 rows × 6 columns

In [3155]:
fm2011_count = female_2011.loc[:,"Total"]
s11_3 = np.sum(fm2011_count)
s11_3
Out[3155]:
238704
In [3156]:
df_age_d014_2011 = df_2011.loc[(df_2011["Age_group"]=="0-14")]

df_age_d014_2011
Out[3156]:
State Year Type Gender Age_group Total
2542 A & N ISLANDS 2011 Cancellation/Non-Settlement of Marriage Female 0-14 0
2544 A & N ISLANDS 2011 Failure in Examination Male 0-14 0
2549 A & N ISLANDS 2011 Professional/Career Problem Male 0-14 0
2555 A & N ISLANDS 2011 Professional Activity Female 0-14 0
2777 A & N ISLANDS 2011 By Jumping from (Other sites) Female 0-14 0
... ... ... ... ... ... ...
236113 UTTAR PRADESH 2011 Student Male 0-14 17
236341 UTTARAKHAND 2011 Service (Private) Female 0-14 0
236552 WEST BENGAL 2011 Bankruptcy or Sudden change in Economic Male 0-14 0
236556 WEST BENGAL 2011 Illegitimate Pregnancy Male 0-14 0
236558 WEST BENGAL 2011 Others Male 0-14 83

3754 rows × 6 columns

In [3157]:
t_014_2011 = df_age_d014_2011.loc[:,"Total"]

s11_4 = np.sum(t_014_2011)
s11_4
Out[3157]:
9096
In [3158]:
df_age_d1529_2011 = df_2011.loc[(df_2011["Age_group"]=="15-29")]

df_age_d1529_2011
Out[3158]:
State Year Type Gender Age_group Total
2546 A & N ISLANDS 2011 Illegitimate Pregnancy Male 15-29 0
2547 A & N ISLANDS 2011 Insanity/Mental Illness Male 15-29 1
2548 A & N ISLANDS 2011 Others Male 15-29 4
2552 A & N ISLANDS 2011 By Consuming Insecticides Male 15-29 0
2554 A & N ISLANDS 2011 By Fire-Arms Female 15-29 0
... ... ... ... ... ... ...
236340 UTTARAKHAND 2011 Service (Government) Male 15-29 5
236554 WEST BENGAL 2011 Failure in Examination Female 15-29 113
236559 WEST BENGAL 2011 Paralysis Male 15-29 0
236562 WEST BENGAL 2011 Unemployment Male 15-29 139
236564 WEST BENGAL 2011 By Jumping off Moving Vehicles/Trains Male 15-29 14

3773 rows × 6 columns

In [3159]:
t_1529_2011 = df_age_d1529_2011.loc[:,"Total"]

s11_5 = np.sum(t_1529_2011)

s11_5
Out[3159]:
144037
In [3160]:
df_age_d3044_2011 = df_2011.loc[(df_2011["Age_group"]=="30-44")]

df_age_d3044_2011
Out[3160]:
State Year Type Gender Age_group Total
2553 A & N ISLANDS 2011 By Drowning Male 30-44 1
2769 A & N ISLANDS 2011 Illness (Aids/STD) Female 30-44 0
2772 A & N ISLANDS 2011 Poverty Female 30-44 0
2774 A & N ISLANDS 2011 Property Dispute Male 30-44 0
2781 A & N ISLANDS 2011 Retired Person Male 30-44 0
... ... ... ... ... ... ...
236557 WEST BENGAL 2011 Not having Children(Barrenness/Impotency Female 30-44 12
236560 WEST BENGAL 2011 Physical Abuse (Rape/Incest Etc.) Female 30-44 2
236563 WEST BENGAL 2011 By Fire/Self Immolation Female 30-44 84
236567 WEST BENGAL 2011 Public Sector Undertaking Female 30-44 61
236568 WEST BENGAL 2011 Public Sector Undertaking Male 30-44 245

3766 rows × 6 columns

In [3161]:
t_3044_2011 = df_age_d3044_2011.loc[:,"Total"]

s11_6 = np.sum(t_3044_2011)
s11_6
Out[3161]:
138640
In [3162]:
df_age_d4559_2011 = df_2011.loc[(df_2011["Age_group"]=="45-59")]

df_age_d4559_2011
Out[3162]:
State Year Type Gender Age_group Total
2543 A & N ISLANDS 2011 Dowry Dispute Male 45-59 0
2545 A & N ISLANDS 2011 Family Problems Female 45-59 1
2773 A & N ISLANDS 2011 Poverty Female 45-59 0
2776 A & N ISLANDS 2011 By Drowning Female 45-59 0
2779 A & N ISLANDS 2011 Others Male 45-59 3
... ... ... ... ... ... ...
236335 UTTARAKHAND 2011 By Jumping from (Building) Female 45-59 0
236553 WEST BENGAL 2011 Divorce Female 45-59 10
236555 WEST BENGAL 2011 Family Problems Male 45-59 512
236561 WEST BENGAL 2011 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
236565 WEST BENGAL 2011 Others Male 45-59 528

3768 rows × 6 columns

In [3163]:
t_4559_2011 = df_age_d4559_2011.loc[:,"Total"]

s11_7 = np.sum(t_4559_2011)

s11_7
Out[3163]:
81876
In [3164]:
df_age_d60_2011 = df_2011.loc[(df_2011["Age_group"]=="60+")]

df_age_d60_2011
Out[3164]:
State Year Type Gender Age_group Total
2551 A & N ISLANDS 2011 By coming under running vehicles/trains Male 60+ 0
2775 A & N ISLANDS 2011 By Consuming Insecticides Male 60+ 2
2868 A & N ISLANDS 2011 Drug Abuse/Addiction Male 60+ 0
2869 A & N ISLANDS 2011 Failure in Examination Male 60+ 0
2871 A & N ISLANDS 2011 Not having Children(Barrenness/Impotency Male 60+ 0
... ... ... ... ... ... ...
236336 UTTARAKHAND 2011 Others Male 60+ 0
236338 UTTARAKHAND 2011 By Self Infliction of injury Male 60+ 1
236566 WEST BENGAL 2011 Others Male 60+ 195
236569 WEST BENGAL 2011 Service (Government) Male 60+ 1
236570 WEST BENGAL 2011 Unemployed Female 60+ 6

3757 rows × 6 columns

In [3165]:
t_60_2011 = df_age_d60_2011.loc[:,"Total"]

s11_8 = np.sum(t_60_2011)
s11_8
Out[3165]:
32340
In [3166]:
df_age_d0100_2011 = df_2011.loc[(df_2011["Age_group"]=="0-100+")]

df_age_d0100_2011
Out[3166]:
State Year Type Gender Age_group Total
2550 A & N ISLANDS 2011 Middle Male 0-100+ 25
3667 A & N ISLANDS 2011 No Education Male 0-100+ 3
3828 A & N ISLANDS 2011 Divorcee Male 0-100+ 0
4930 A & N ISLANDS 2011 Graduate Female 0-100+ 0
4940 A & N ISLANDS 2011 Seperated Female 0-100+ 0
... ... ... ... ... ... ...
234238 MIZORAM 2011 Post Graduate and Above Male 0-100+ 0
236104 UTTAR PRADESH 2011 Post Graduate and Above Female 0-100+ 16
236329 UTTARAKHAND 2011 Graduate Female 0-100+ 10
236330 UTTARAKHAND 2011 Hr. Secondary/Intermediate/Pre-Universit Female 0-100+ 16
236331 UTTARAKHAND 2011 Post Graduate and Above Male 0-100+ 4

910 rows × 6 columns

In [3167]:
t_0100_2011 = df_age_d0100_2011.loc[:,"Total"]

s11_54 = np.sum(t_0100_2011)
s11_54
Out[3167]:
271170
In [3168]:
df_014m_2011 = df_age_d014_2011.loc[(df_age_d014_2011["Gender"]=="Male")]
df_014m_2011
Out[3168]:
State Year Type Gender Age_group Total
2544 A & N ISLANDS 2011 Failure in Examination Male 0-14 0
2549 A & N ISLANDS 2011 Professional/Career Problem Male 0-14 0
2778 A & N ISLANDS 2011 By Machine Male 0-14 0
2780 A & N ISLANDS 2011 By Over Alcoholism Male 0-14 0
3034 A & N ISLANDS 2011 Illegitimate Pregnancy Male 0-14 0
... ... ... ... ... ... ...
236112 UTTAR PRADESH 2011 Public Sector Undertaking Male 0-14 0
236113 UTTAR PRADESH 2011 Student Male 0-14 17
236552 WEST BENGAL 2011 Bankruptcy or Sudden change in Economic Male 0-14 0
236556 WEST BENGAL 2011 Illegitimate Pregnancy Male 0-14 0
236558 WEST BENGAL 2011 Others Male 0-14 83

1880 rows × 6 columns

In [3169]:
t_014m_2011 = df_014m_2011.loc[:,"Total"]

s11_9 = np.sum(t_014m_2011)
s11_9
Out[3169]:
4722
In [3170]:
df_014fm_2011 = df_age_d014_2011.loc[(df_age_d014_2011["Gender"]=="Female")]
df_014fm_2011
Out[3170]:
State Year Type Gender Age_group Total
2542 A & N ISLANDS 2011 Cancellation/Non-Settlement of Marriage Female 0-14 0
2555 A & N ISLANDS 2011 Professional Activity Female 0-14 0
2777 A & N ISLANDS 2011 By Jumping from (Other sites) Female 0-14 0
2873 A & N ISLANDS 2011 Paralysis Female 0-14 0
3590 A & N ISLANDS 2011 Bankruptcy or Sudden change in Economic Female 0-14 0
... ... ... ... ... ... ...
235693 TAMIL NADU 2011 Cancellation/Non-Settlement of Marriage Female 0-14 0
235704 TAMIL NADU 2011 By Jumping from (Other sites) Female 0-14 1
235706 TAMIL NADU 2011 Retired Person Female 0-14 0
236100 UTTAR PRADESH 2011 Ideological Causes/Hero Worshipping Female 0-14 0
236341 UTTARAKHAND 2011 Service (Private) Female 0-14 0

1874 rows × 6 columns

In [3171]:
t_014fm_2011 = df_014fm_2011.loc[:,"Total"]

s11_10 = np.sum(t_014fm_2011)
s11_10
Out[3171]:
4374
In [3172]:
df_1529m_2011 = df_age_d1529_2011.loc[(df_age_d1529_2011["Gender"]=="Male")]
df_1529m_2011
Out[3172]:
State Year Type Gender Age_group Total
2546 A & N ISLANDS 2011 Illegitimate Pregnancy Male 15-29 0
2547 A & N ISLANDS 2011 Insanity/Mental Illness Male 15-29 1
2548 A & N ISLANDS 2011 Others Male 15-29 4
2552 A & N ISLANDS 2011 By Consuming Insecticides Male 15-29 0
2865 A & N ISLANDS 2011 Bankruptcy or Sudden change in Economic Male 15-29 0
... ... ... ... ... ... ...
236337 UTTARAKHAND 2011 By Self Infliction of injury Male 15-29 1
236340 UTTARAKHAND 2011 Service (Government) Male 15-29 5
236559 WEST BENGAL 2011 Paralysis Male 15-29 0
236562 WEST BENGAL 2011 Unemployment Male 15-29 139
236564 WEST BENGAL 2011 By Jumping off Moving Vehicles/Trains Male 15-29 14

1888 rows × 6 columns

In [3173]:
t_1529m_2011 = df_1529m_2011.loc[:,"Total"]

s11_11 = np.sum(t_1529m_2011)
s11_11
Out[3173]:
79808
In [3174]:
df_1529fm_2011 = df_age_d1529_2011.loc[(df_age_d1529_2011["Gender"]=="Female")]
df_1529fm_2011
Out[3174]:
State Year Type Gender Age_group Total
2554 A & N ISLANDS 2011 By Fire-Arms Female 15-29 0
2770 A & N ISLANDS 2011 Other Prolonged Illness Female 15-29 3
2771 A & N ISLANDS 2011 Poverty Female 15-29 0
2870 A & N ISLANDS 2011 Illness (Aids/STD) Female 15-29 0
2872 A & N ISLANDS 2011 Others Female 15-29 6
... ... ... ... ... ... ...
235910 TRIPURA 2011 Love Affairs Female 15-29 21
235911 TRIPURA 2011 Physical Abuse (Rape/Incest Etc.) Female 15-29 0
235915 TRIPURA 2011 Retired Person Female 15-29 0
236098 UTTAR PRADESH 2011 Divorce Female 15-29 11
236554 WEST BENGAL 2011 Failure in Examination Female 15-29 113

1885 rows × 6 columns

In [3175]:
t_1529fm_2011 = df_1529fm_2011.loc[:,"Total"]

s11_12 = np.sum(t_1529fm_2011)
s11_12
Out[3175]:
64229
In [3176]:
df_3044m_2011 = df_age_d3044_2011.loc[(df_age_d3044_2011["Gender"]=="Male")]
df_3044m_2011
Out[3176]:
State Year Type Gender Age_group Total
2553 A & N ISLANDS 2011 By Drowning Male 30-44 1
2774 A & N ISLANDS 2011 Property Dispute Male 30-44 0
2781 A & N ISLANDS 2011 Retired Person Male 30-44 0
3037 A & N ISLANDS 2011 Unemployment Male 30-44 1
3817 A & N ISLANDS 2011 Failure in Examination Male 30-44 0
... ... ... ... ... ... ...
235702 TAMIL NADU 2011 By Drowning Male 30-44 208
236106 UTTAR PRADESH 2011 By Consuming Insecticides Male 30-44 62
236108 UTTAR PRADESH 2011 By Machine Male 30-44 4
236332 UTTARAKHAND 2011 By Drowning Male 30-44 8
236568 WEST BENGAL 2011 Public Sector Undertaking Male 30-44 245

1886 rows × 6 columns

In [3177]:
t_3044m_2011 = df_3044m_2011.loc[:,"Total"]

s11_13 = np.sum(t_3044m_2011)
s11_13
Out[3177]:
94197
In [3178]:
df_3044fm_2011 = df_age_d3044_2011.loc[(df_age_d3044_2011["Gender"]=="Female")]
df_3044fm_2011
Out[3178]:
State Year Type Gender Age_group Total
2769 A & N ISLANDS 2011 Illness (Aids/STD) Female 30-44 0
2772 A & N ISLANDS 2011 Poverty Female 30-44 0
2782 A & N ISLANDS 2011 Unemployed Female 30-44 0
2867 A & N ISLANDS 2011 Cancer Female 30-44 0
3666 A & N ISLANDS 2011 Love Affairs Female 30-44 1
... ... ... ... ... ... ...
236339 UTTARAKHAND 2011 Retired Person Female 30-44 0
236557 WEST BENGAL 2011 Not having Children(Barrenness/Impotency Female 30-44 12
236560 WEST BENGAL 2011 Physical Abuse (Rape/Incest Etc.) Female 30-44 2
236563 WEST BENGAL 2011 By Fire/Self Immolation Female 30-44 84
236567 WEST BENGAL 2011 Public Sector Undertaking Female 30-44 61

1880 rows × 6 columns

In [3179]:
t_3044fm_2011 = df_3044fm_2011.loc[:,"Total"]

s11_14 = np.sum(t_3044fm_2011)
s11_14
Out[3179]:
44443
In [3180]:
df_4559m_2011 = df_age_d4559_2011.loc[(df_age_d4559_2011["Gender"]=="Male")]
df_4559m_2011
Out[3180]:
State Year Type Gender Age_group Total
2543 A & N ISLANDS 2011 Dowry Dispute Male 45-59 0
2779 A & N ISLANDS 2011 Others Male 45-59 3
3274 A & N ISLANDS 2011 Love Affairs Male 45-59 0
4151 A & N ISLANDS 2011 Poverty Male 45-59 0
4787 A & N ISLANDS 2011 Ideological Causes/Hero Worshipping Male 45-59 0
... ... ... ... ... ... ...
236099 UTTAR PRADESH 2011 Drug Abuse/Addiction Male 45-59 27
236110 UTTAR PRADESH 2011 Others Male 45-59 117
236333 UTTARAKHAND 2011 By Drowning Male 45-59 6
236555 WEST BENGAL 2011 Family Problems Male 45-59 512
236565 WEST BENGAL 2011 Others Male 45-59 528

1886 rows × 6 columns

In [3181]:
t_4559m_2011 = df_4559m_2011.loc[:,"Total"]

s11_15 = np.sum(t_4559m_2011)
s11_15
Out[3181]:
60789
In [3182]:
df_4559fm_2011 = df_age_d4559_2011.loc[(df_age_d4559_2011["Gender"]=="Female")]
df_4559fm_2011
Out[3182]:
State Year Type Gender Age_group Total
2545 A & N ISLANDS 2011 Family Problems Female 45-59 1
2773 A & N ISLANDS 2011 Poverty Female 45-59 0
2776 A & N ISLANDS 2011 By Drowning Female 45-59 0
3591 A & N ISLANDS 2011 Cancer Female 45-59 0
4148 A & N ISLANDS 2011 Not having Children(Barrenness/Impotency Female 45-59 0
... ... ... ... ... ... ...
236111 UTTAR PRADESH 2011 Professional Activity Female 45-59 2
236328 UTTARAKHAND 2011 Professional/Career Problem Female 45-59 0
236335 UTTARAKHAND 2011 By Jumping from (Building) Female 45-59 0
236553 WEST BENGAL 2011 Divorce Female 45-59 10
236561 WEST BENGAL 2011 Physical Abuse (Rape/Incest Etc.) Female 45-59 0

1882 rows × 6 columns

In [3183]:
t_4559fm_2011 = df_4559fm_2011.loc[:,"Total"]

s11_16 = np.sum(t_4559fm_2011)
s11_16
Out[3183]:
21087
In [3184]:
df_60m_2011 = df_age_d60_2011.loc[(df_age_d60_2011["Gender"]=="Male")]
df_60m_2011
Out[3184]:
State Year Type Gender Age_group Total
2551 A & N ISLANDS 2011 By coming under running vehicles/trains Male 60+ 0
2775 A & N ISLANDS 2011 By Consuming Insecticides Male 60+ 2
2868 A & N ISLANDS 2011 Drug Abuse/Addiction Male 60+ 0
2869 A & N ISLANDS 2011 Failure in Examination Male 60+ 0
2871 A & N ISLANDS 2011 Not having Children(Barrenness/Impotency Male 60+ 0
... ... ... ... ... ... ...
236327 UTTARAKHAND 2011 Ideological Causes/Hero Worshipping Male 60+ 0
236336 UTTARAKHAND 2011 Others Male 60+ 0
236338 UTTARAKHAND 2011 By Self Infliction of injury Male 60+ 1
236566 WEST BENGAL 2011 Others Male 60+ 195
236569 WEST BENGAL 2011 Service (Government) Male 60+ 1

1881 rows × 6 columns

In [3185]:
t_60m_2011 = df_60m_2011.loc[:,"Total"]

s11_17 = np.sum(t_60m_2011)
s11_17
Out[3185]:
23261
In [3186]:
df_60fm_2011 = df_age_d60_2011.loc[(df_age_d60_2011["Gender"]=="Female")]
df_60fm_2011
Out[3186]:
State Year Type Gender Age_group Total
3032 A & N ISLANDS 2011 Death of Dear Person Female 60+ 0
3663 A & N ISLANDS 2011 Divorce Female 60+ 0
3665 A & N ISLANDS 2011 Family Problems Female 60+ 1
3669 A & N ISLANDS 2011 By Over Alcoholism Female 60+ 0
3671 A & N ISLANDS 2011 By touching electric wires Female 60+ 0
... ... ... ... ... ... ...
235912 TRIPURA 2011 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
235916 TRIPURA 2011 Retired Person Female 60+ 0
236102 UTTAR PRADESH 2011 Insanity/Mental Illness Female 60+ 7
236334 UTTARAKHAND 2011 By Fire/Self Immolation Female 60+ 0
236570 WEST BENGAL 2011 Unemployed Female 60+ 6

1876 rows × 6 columns

In [3187]:
t_60fm_2011 = df_60fm_2011.loc[:,"Total"]

s11_18 = np.sum(t_60fm_2011)
s11_18
Out[3187]:
9079
In [3188]:
df_0100fm_2011 = df_age_d0100_2011.loc[(df_age_d0100_2011["Gender"]=="Female")]
df_0100fm_2011
Out[3188]:
State Year Type Gender Age_group Total
4930 A & N ISLANDS 2011 Graduate Female 0-100+ 0
4940 A & N ISLANDS 2011 Seperated Female 0-100+ 0
4970 A & N ISLANDS 2011 Post Graduate and Above Female 0-100+ 0
5422 A & N ISLANDS 2011 Primary Female 0-100+ 10
5436 A & N ISLANDS 2011 Married Female 0-100+ 26
... ... ... ... ... ... ...
233827 MANIPUR 2011 Divorcee Female 0-100+ 0
234010 MEGHALAYA 2011 Divorcee Female 0-100+ 0
236104 UTTAR PRADESH 2011 Post Graduate and Above Female 0-100+ 16
236329 UTTARAKHAND 2011 Graduate Female 0-100+ 10
236330 UTTARAKHAND 2011 Hr. Secondary/Intermediate/Pre-Universit Female 0-100+ 16

455 rows × 6 columns

In [3189]:
t_0100fm_2011 = df_0100fm_2011.loc[:,"Total"]

s11_55 = np.sum(t_0100fm_2011)
s11_55
Out[3189]:
95492
In [3190]:
df_0100m_2011 = df_age_d0100_2011.loc[(df_age_d0100_2011["Gender"]=="Male")]
df_0100m_2011
Out[3190]:
State Year Type Gender Age_group Total
2550 A & N ISLANDS 2011 Middle Male 0-100+ 25
3667 A & N ISLANDS 2011 No Education Male 0-100+ 3
3828 A & N ISLANDS 2011 Divorcee Male 0-100+ 0
5198 A & N ISLANDS 2011 Diploma Male 0-100+ 2
5500 A & N ISLANDS 2011 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 16
... ... ... ... ... ... ...
232951 KERALA 2011 Primary Male 0-100+ 1196
233815 MANIPUR 2011 Matriculate/Secondary Male 0-100+ 6
234004 MEGHALAYA 2011 Graduate Male 0-100+ 5
234238 MIZORAM 2011 Post Graduate and Above Male 0-100+ 0
236331 UTTARAKHAND 2011 Post Graduate and Above Male 0-100+ 4

455 rows × 6 columns

In [3191]:
t_0100m_2011 = df_0100m_2011.loc[:,"Total"]

s11_56 = np.sum(t_0100m_2011)
s11_56
Out[3191]:
175678
In [3192]:
df_st_AN_2011 = df_2011.loc[(df_2011["State"]=="A & N ISLANDS")]

df_st_AN_2011
Out[3192]:
State Year Type Gender Age_group Total
2542 A & N ISLANDS 2011 Cancellation/Non-Settlement of Marriage Female 0-14 0
2543 A & N ISLANDS 2011 Dowry Dispute Male 45-59 0
2544 A & N ISLANDS 2011 Failure in Examination Male 0-14 0
2545 A & N ISLANDS 2011 Family Problems Female 45-59 1
2546 A & N ISLANDS 2011 Illegitimate Pregnancy Male 15-29 0
... ... ... ... ... ... ...
229183 A & N ISLANDS 2011 Farming/Agriculture Activity Female 60+ 0
229184 A & N ISLANDS 2011 Public Sector Undertaking Female 45-59 0
229185 A & N ISLANDS 2011 Self-employed (Business activity) Female 15-29 2
229186 A & N ISLANDS 2011 Service (Government) Female 15-29 2
229187 A & N ISLANDS 2011 Seperated Male 0-100+ 1

561 rows × 6 columns

In [3193]:
t_AN_2011 = df_st_AN_2011.loc[:,"Total"]

s11_19 = np.sum(t_AN_2011)
s11_19
Out[3193]:
680
In [3194]:
df_st_AP_2011 = df_2011.loc[(df_2011["State"]=="ANDHRA PRADESH")]

df_st_AP_2011
Out[3194]:
State Year Type Gender Age_group Total
9418 ANDHRA PRADESH 2011 Bankruptcy or Sudden change in Economic Male 0-14 0
9419 ANDHRA PRADESH 2011 Cancer Male 45-59 14
9420 ANDHRA PRADESH 2011 Causes Not known Female 45-59 65
9421 ANDHRA PRADESH 2011 Causes Not known Male 0-14 22
9422 ANDHRA PRADESH 2011 Dowry Dispute Female 15-29 201
... ... ... ... ... ... ...
229523 ANDHRA PRADESH 2011 Others Female 45-59 72
229524 ANDHRA PRADESH 2011 Professional Activity Female 30-44 11
229525 ANDHRA PRADESH 2011 Service (Private) Male 30-44 543
229526 ANDHRA PRADESH 2011 Service (Private) Male 45-59 419
229527 ANDHRA PRADESH 2011 Student Male 45-59 0

566 rows × 6 columns

In [3195]:
t_AP_2011 = df_st_AP_2011.loc[:,"Total"]

s11_20 = np.sum(t_AP_2011)
s11_20
Out[3195]:
75385
In [3196]:
df_st_ARP_2011 = df_2011.loc[(df_2011["State"]=="ARUNACHAL PRADESH")]

df_st_ARP_2011
Out[3196]:
State Year Type Gender Age_group Total
14700 ARUNACHAL PRADESH 2011 Causes Not known Male 45-59 8
14701 ARUNACHAL PRADESH 2011 Dowry Dispute Female 30-44 0
14702 ARUNACHAL PRADESH 2011 Family Problems Female 15-29 1
14703 ARUNACHAL PRADESH 2011 Illness (Aids/STD) Male 0-14 0
14704 ARUNACHAL PRADESH 2011 Professional/Career Problem Female 15-29 0
... ... ... ... ... ... ...
229720 ARUNACHAL PRADESH 2011 By Overdose of sleeping pills Female 60+ 0
229721 ARUNACHAL PRADESH 2011 By Self Infliction of injury Female 60+ 0
229722 ARUNACHAL PRADESH 2011 Others Male 60+ 0
229723 ARUNACHAL PRADESH 2011 Student Male 15-29 7
229724 ARUNACHAL PRADESH 2011 Seperated Male 0-100+ 0

563 rows × 6 columns

In [3197]:
t_ARP_2011 = df_st_ARP_2011.loc[:,"Total"]

s11_21 = np.sum(t_ARP_2011)
s11_21
Out[3197]:
670
In [3198]:
df_st_AS_2011 = df_2011.loc[(df_2011["State"]=="ASSAM")]

df_st_AS_2011
Out[3198]:
State Year Type Gender Age_group Total
19439 ASSAM 2011 Cancer Male 30-44 18
19440 ASSAM 2011 Dowry Dispute Female 45-59 0
19441 ASSAM 2011 Drug Abuse/Addiction Female 0-14 0
19442 ASSAM 2011 Failure in Examination Male 0-14 1
19443 ASSAM 2011 Ideological Causes/Hero Worshipping Female 45-59 0
... ... ... ... ... ... ...
229902 ASSAM 2011 Public Sector Undertaking Male 45-59 22
229903 ASSAM 2011 Self-employed (Business activity) Female 0-14 0
229904 ASSAM 2011 Service (Government) Female 15-29 0
229905 ASSAM 2011 Divorcee Male 0-100+ 22
229906 ASSAM 2011 Seperated Male 0-100+ 96

566 rows × 6 columns

In [3199]:
t_AS_2011 = df_st_AS_2011.loc[:,"Total"]

s11_22 = np.sum(t_AS_2011)
s11_22
Out[3199]:
13630
In [3200]:
df_st_BH_2011 = df_2011.loc[(df_2011["State"]=="BIHAR")]

df_st_BH_2011
Out[3200]:
State Year Type Gender Age_group Total
24700 BIHAR 2011 Divorce Female 15-29 2
24701 BIHAR 2011 Divorce Male 15-29 0
24702 BIHAR 2011 Drug Abuse/Addiction Female 60+ 0
24703 BIHAR 2011 Ideological Causes/Hero Worshipping Female 15-29 0
24704 BIHAR 2011 Ideological Causes/Hero Worshipping Female 60+ 0
... ... ... ... ... ... ...
230156 BIHAR 2011 By Jumping off Moving Vehicles/Trains Female 15-29 0
230157 BIHAR 2011 House Wife Male 45-59 0
230158 BIHAR 2011 Professional Activity Male 45-59 3
230159 BIHAR 2011 Service (Government) Female 0-14 0
230160 BIHAR 2011 Service (Government) Male 30-44 5

566 rows × 6 columns

In [3201]:
t_BH_2011 = df_st_BH_2011.loc[:,"Total"]

s11_23 = np.sum(t_BH_2011)
s11_23
Out[3201]:
3975
In [3202]:
df_st_CH_2011 = df_2011.loc[(df_2011["State"]=="CHANDIGARH")]

df_st_CH_2011
Out[3202]:
State Year Type Gender Age_group Total
33177 CHANDIGARH 2011 Cancellation/Non-Settlement of Marriage Male 15-29 0
33178 CHANDIGARH 2011 Cancer Female 0-14 0
33179 CHANDIGARH 2011 Death of Dear Person Male 60+ 0
33180 CHANDIGARH 2011 Divorce Male 60+ 0
33181 CHANDIGARH 2011 Dowry Dispute Female 15-29 0
... ... ... ... ... ... ...
230375 CHANDIGARH 2011 By Self Infliction of injury Female 30-44 0
230376 CHANDIGARH 2011 House Wife Female 45-59 2
230377 CHANDIGARH 2011 Retired Person Male 30-44 0
230378 CHANDIGARH 2011 Service (Private) Male 0-14 0
230379 CHANDIGARH 2011 Seperated Female 0-100+ 0

562 rows × 6 columns

In [3203]:
t_CH_2011 = df_st_CH_2011.loc[:,"Total"]

s11_24 = np.sum(t_CH_2011)
s11_24
Out[3203]:
525
In [3204]:
df_st_CT_2011 = df_2011.loc[(df_2011["State"]=="CHHATTISGARH")]

df_st_CT_2011
Out[3204]:
State Year Type Gender Age_group Total
39250 CHHATTISGARH 2011 Bankruptcy or Sudden change in Economic Male 0-14 0
39251 CHHATTISGARH 2011 Dowry Dispute Female 0-14 0
39252 CHHATTISGARH 2011 Drug Abuse/Addiction Male 15-29 57
39253 CHHATTISGARH 2011 Family Problems Male 60+ 26
39254 CHHATTISGARH 2011 Ideological Causes/Hero Worshipping Female 0-14 0
... ... ... ... ... ... ...
230587 CHHATTISGARH 2011 By Jumping from (Building) Male 45-59 0
230588 CHHATTISGARH 2011 By Over Alcoholism Male 15-29 10
230589 CHHATTISGARH 2011 Retired Person Female 15-29 0
230590 CHHATTISGARH 2011 Retired Person Female 60+ 0
230591 CHHATTISGARH 2011 Student Male 30-44 9

566 rows × 6 columns

In [3205]:
t_CT_2011 = df_st_CT_2011.loc[:,"Total"]

s11_25 = np.sum(t_CT_2011)
s11_25
Out[3205]:
33780
In [3206]:
df_st_DN_2011 = df_2011.loc[(df_2011["State"]=="D & N HAVELI")]

df_st_DN_2011
Out[3206]:
State Year Type Gender Age_group Total
45621 D & N HAVELI 2011 Bankruptcy or Sudden change in Economic Male 15-29 0
45622 D & N HAVELI 2011 Divorce Male 30-44 0
45623 D & N HAVELI 2011 Failure in Examination Female 15-29 0
46083 D & N HAVELI 2011 Family Problems Male 15-29 3
46084 D & N HAVELI 2011 Love Affairs Female 60+ 0
... ... ... ... ... ... ...
230797 D & N HAVELI 2011 By Fire-Arms Female 45-59 0
230798 D & N HAVELI 2011 Others Female 60+ 0
230799 D & N HAVELI 2011 By touching electric wires Male 0-14 0
230800 D & N HAVELI 2011 House Wife Female 15-29 5
230801 D & N HAVELI 2011 Service (Private) Female 45-59 0

560 rows × 6 columns

In [3207]:
t_DN_2011 = df_st_DN_2011.loc[:,"Total"]

s11_26 = np.sum(t_DN_2011)
s11_26
Out[3207]:
315
In [3208]:
df_st_DD_2011 = df_2011.loc[(df_2011["State"]=="DAMAN & DIU")]

df_st_DD_2011
Out[3208]:
State Year Type Gender Age_group Total
52726 DAMAN & DIU 2011 Cancellation/Non-Settlement of Marriage Male 45-59 0
52727 DAMAN & DIU 2011 Divorce Male 60+ 0
52728 DAMAN & DIU 2011 Failure in Examination Female 15-29 0
52729 DAMAN & DIU 2011 Failure in Examination Male 0-14 0
52730 DAMAN & DIU 2011 Fall in Social Reputation Female 45-59 0
... ... ... ... ... ... ...
230989 DAMAN & DIU 2011 By coming under running vehicles/trains Female 45-59 0
230990 DAMAN & DIU 2011 By Fire-Arms Male 15-29 0
230991 DAMAN & DIU 2011 By Jumping off Moving Vehicles/Trains Female 45-59 0
230992 DAMAN & DIU 2011 Others Female 15-29 1
230993 DAMAN & DIU 2011 Public Sector Undertaking Male 0-14 0

560 rows × 6 columns

In [3209]:
t_DD_2011 = df_st_DD_2011.loc[:,"Total"]

s11_27 = np.sum(t_DD_2011)
s11_27
Out[3209]:
165
In [3210]:
df_st_DL_2011 = df_2011.loc[(df_2011["State"]=="DELHI (UT)")]

df_st_DL_2011
Out[3210]:
State Year Type Gender Age_group Total
57318 DELHI (UT) 2011 Cancer Female 45-59 0
57319 DELHI (UT) 2011 Death of Dear Person Female 60+ 0
57320 DELHI (UT) 2011 Divorce Male 0-14 0
57321 DELHI (UT) 2011 Dowry Dispute Female 30-44 6
57322 DELHI (UT) 2011 Failure in Examination Female 0-14 2
... ... ... ... ... ... ...
231245 DELHI (UT) 2011 By Self Infliction of injury Male 60+ 0
231246 DELHI (UT) 2011 Farming/Agriculture Activity Male 15-29 2
231247 DELHI (UT) 2011 Others Male 15-29 70
231248 DELHI (UT) 2011 Others Male 30-44 51
231249 DELHI (UT) 2011 Seperated Male 0-100+ 51

566 rows × 6 columns

In [3211]:
t_DL_2011 = df_st_DL_2011.loc[:,"Total"]

s11_28 = np.sum(t_DL_2011)
s11_28
Out[3211]:
8580
In [3212]:
df_st_GOA_2011 = df_2011.loc[(df_2011["State"]=="GOA")]

df_st_GOA_2011
Out[3212]:
State Year Type Gender Age_group Total
62410 GOA 2011 Cancer Female 0-14 0
63177 GOA 2011 Cancer Female 60+ 1
63178 GOA 2011 Dowry Dispute Male 0-14 0
63179 GOA 2011 Ideological Causes/Hero Worshipping Male 0-14 0
63180 GOA 2011 Illness (Aids/STD) Male 15-29 2
... ... ... ... ... ... ...
231473 GOA 2011 By Overdose of sleeping pills Male 60+ 1
231474 GOA 2011 House Wife Female 30-44 22
231475 GOA 2011 Others Female 45-59 1
231476 GOA 2011 Public Sector Undertaking Male 45-59 0
231477 GOA 2011 Retired Person Female 30-44 0

563 rows × 6 columns

In [3213]:
t_GOA_2011 = df_st_GOA_2011.loc[:,"Total"]

s11_29 = np.sum(t_GOA_2011)
s11_29
Out[3213]:
1465
In [3214]:
df_st_GJ_2011 = df_2011.loc[(df_2011["State"]=="GUJARAT")]

df_st_GJ_2011
Out[3214]:
State Year Type Gender Age_group Total
69908 GUJARAT 2011 Causes Not known Male 60+ 47
69909 GUJARAT 2011 Dowry Dispute Female 60+ 0
69910 GUJARAT 2011 Dowry Dispute Male 45-59 0
69911 GUJARAT 2011 Insanity/Mental Illness Female 15-29 57
69912 GUJARAT 2011 Insanity/Mental Illness Male 0-14 0
... ... ... ... ... ... ...
231679 GUJARAT 2011 By Jumping from (Other sites) Female 15-29 22
231680 GUJARAT 2011 By Jumping from (Other sites) Female 30-44 3
231681 GUJARAT 2011 Others Male 15-29 30
231682 GUJARAT 2011 By Over Alcoholism Female 15-29 0
231683 GUJARAT 2011 By Over Alcoholism Female 60+ 0

566 rows × 6 columns

In [3215]:
t_GJ_2011 = df_st_GJ_2011.loc[:,"Total"]

s11_30 = np.sum(t_GJ_2011)
s11_30
Out[3215]:
31910
In [3216]:
df_st_HR_2011 = df_2011.loc[(df_2011["State"]=="HARYANA")]

df_st_HR_2011
Out[3216]:
State Year Type Gender Age_group Total
74671 HARYANA 2011 Cancer Male 45-59 0
74672 HARYANA 2011 Dowry Dispute Female 45-59 0
74673 HARYANA 2011 Dowry Dispute Male 15-29 0
74674 HARYANA 2011 Illness (Aids/STD) Male 60+ 10
74675 HARYANA 2011 Professional/Career Problem Female 0-14 0
... ... ... ... ... ... ...
231886 HARYANA 2011 By touching electric wires Female 45-59 1
231887 HARYANA 2011 By touching electric wires Female 60+ 0
231888 HARYANA 2011 Others Male 45-59 61
231889 HARYANA 2011 Service (Private) Female 15-29 11
231890 HARYANA 2011 Student Female 45-59 0

566 rows × 6 columns

In [3217]:
t_HR_2011 = df_st_HR_2011.loc[:,"Total"]

s11_31 = np.sum(t_HR_2011)
s11_31
Out[3217]:
16225
In [3218]:
df_st_HP_2011 = df_2011.loc[(df_2011["State"]=="HIMACHAL PRADESH")]

df_st_HP_2011
Out[3218]:
State Year Type Gender Age_group Total
82207 HIMACHAL PRADESH 2011 Bankruptcy or Sudden change in Economic Male 30-44 1
82208 HIMACHAL PRADESH 2011 Cancellation/Non-Settlement of Marriage Female 15-29 2
82209 HIMACHAL PRADESH 2011 Causes Not known Male 60+ 6
82210 HIMACHAL PRADESH 2011 Failure in Examination Female 45-59 0
82211 HIMACHAL PRADESH 2011 Fall in Social Reputation Male 45-59 1
... ... ... ... ... ... ...
232120 HIMACHAL PRADESH 2011 Others Female 15-29 10
232121 HIMACHAL PRADESH 2011 Professional Activity Male 0-14 0
232122 HIMACHAL PRADESH 2011 Public Sector Undertaking Male 0-14 0
232123 HIMACHAL PRADESH 2011 Service (Government) Male 0-14 0
232124 HIMACHAL PRADESH 2011 Unemployed Male 30-44 7

565 rows × 6 columns

In [3219]:
t_HP_2011 = df_st_HP_2011.loc[:,"Total"]

s11_32 = np.sum(t_HP_2011)
s11_32
Out[3219]:
2214
In [3220]:
df_st_JK_2011 = df_2011.loc[(df_2011["State"]=="JAMMU & KASHMIR")]

df_st_JK_2011
Out[3220]:
State Year Type Gender Age_group Total
89409 JAMMU & KASHMIR 2011 Bankruptcy or Sudden change in Economic Male 15-29 0
89410 JAMMU & KASHMIR 2011 Divorce Female 60+ 0
89411 JAMMU & KASHMIR 2011 Divorce Male 30-44 0
89412 JAMMU & KASHMIR 2011 Dowry Dispute Female 15-29 1
89413 JAMMU & KASHMIR 2011 Drug Abuse/Addiction Female 15-29 1
... ... ... ... ... ... ...
232345 JAMMU & KASHMIR 2011 By Jumping from (Building) Male 60+ 0
232346 JAMMU & KASHMIR 2011 Others Female 15-29 22
232347 JAMMU & KASHMIR 2011 Service (Private) Female 45-59 0
232348 JAMMU & KASHMIR 2011 Student Male 0-14 2
232349 JAMMU & KASHMIR 2011 Seperated Male 0-100+ 10

564 rows × 6 columns

In [3221]:
t_JK_2011 = df_st_JK_2011.loc[:,"Total"]

s11_33 = np.sum(t_JK_2011)
s11_33
Out[3221]:
1432
In [3222]:
df_st_JH_2011 = df_2011.loc[(df_2011["State"]=="JHARKHAND")]

df_st_JH_2011
Out[3222]:
State Year Type Gender Age_group Total
94219 JHARKHAND 2011 Death of Dear Person Female 60+ 0
94220 JHARKHAND 2011 Failure in Examination Male 30-44 1
94221 JHARKHAND 2011 Illegitimate Pregnancy Male 0-14 0
94222 JHARKHAND 2011 Matriculate/Secondary Male 0-100+ 223
94223 JHARKHAND 2011 Post Graduate and Above Male 0-100+ 0
... ... ... ... ... ... ...
232573 JHARKHAND 2011 Physical Abuse (Rape/Incest Etc.) Female 15-29 0
232574 JHARKHAND 2011 Property Dispute Female 45-59 1
232575 JHARKHAND 2011 By Machine Female 30-44 0
232576 JHARKHAND 2011 Farming/Agriculture Activity Male 0-14 0
232577 JHARKHAND 2011 Retired Person Female 60+ 0

566 rows × 6 columns

In [3223]:
t_JH_2011 = df_st_JH_2011.loc[:,"Total"]

s11_34 = np.sum(t_JH_2011)
s11_34
Out[3223]:
6060
In [3224]:
df_st_KN_2011 = df_2011.loc[(df_2011["State"]=="KARNATAKA")]

df_st_KN_2011
Out[3224]:
State Year Type Gender Age_group Total
99087 KARNATAKA 2011 Bankruptcy or Sudden change in Economic Female 15-29 9
99088 KARNATAKA 2011 Cancer Male 60+ 17
99089 KARNATAKA 2011 Causes Not known Male 45-59 434
99090 KARNATAKA 2011 Drug Abuse/Addiction Male 60+ 7
99091 KARNATAKA 2011 Illness (Aids/STD) Male 45-59 4
... ... ... ... ... ... ...
232738 KARNATAKA 2011 Others Female 0-14 62
232739 KARNATAKA 2011 Service (Private) Male 15-29 180
232740 KARNATAKA 2011 Service (Private) Male 30-44 377
232741 KARNATAKA 2011 Student Male 15-29 343
232742 KARNATAKA 2011 Unemployed Male 45-59 154

566 rows × 6 columns

In [3225]:
t_KN_2011 = df_st_KN_2011.loc[:,"Total"]

s11_35 = np.sum(t_KN_2011)
s11_35
Out[3225]:
63110
In [3226]:
df_st_KER_2011 = df_2011.loc[(df_2011["State"]=="KERALA")]

df_st_KER_2011
Out[3226]:
State Year Type Gender Age_group Total
105850 KERALA 2011 Cancer Female 0-14 0
105851 KERALA 2011 Dowry Dispute Male 15-29 1
105852 KERALA 2011 Others Female 60+ 15
105853 KERALA 2011 Other Prolonged Illness Male 60+ 280
105854 KERALA 2011 Paralysis Female 0-14 0
... ... ... ... ... ... ...
232955 KERALA 2011 By Jumping off Moving Vehicles/Trains Female 60+ 2
232956 KERALA 2011 Farming/Agriculture Activity Female 60+ 18
232957 KERALA 2011 Farming/Agriculture Activity Male 60+ 186
232958 KERALA 2011 Self-employed (Business activity) Female 30-44 1
232959 KERALA 2011 Unemployed Female 30-44 40

564 rows × 6 columns

In [3227]:
t_KER_2011 = df_st_KER_2011.loc[:,"Total"]

s11_36 = np.sum(t_KER_2011)
s11_36
Out[3227]:
41421
In [3228]:
df_st_LD_2011 = df_2011.loc[(df_2011["State"]=="LAKSHADWEEP")]

df_st_LD_2011
Out[3228]:
State Year Type Gender Age_group Total
112179 LAKSHADWEEP 2011 Cancellation/Non-Settlement of Marriage Male 0-14 0
112180 LAKSHADWEEP 2011 Cancer Male 60+ 0
112181 LAKSHADWEEP 2011 Causes Not known Male 0-14 0
112182 LAKSHADWEEP 2011 Death of Dear Person Male 30-44 0
112183 LAKSHADWEEP 2011 Divorce Male 15-29 0
... ... ... ... ... ... ...
233177 LAKSHADWEEP 2011 By Jumping from (Building) Male 45-59 0
233178 LAKSHADWEEP 2011 Others Female 60+ 0
233179 LAKSHADWEEP 2011 Retired Person Male 30-44 0
233180 LAKSHADWEEP 2011 Service (Private) Male 0-14 0
233181 LAKSHADWEEP 2011 Seperated Female 0-100+ 0

556 rows × 6 columns

In [3229]:
t_LD_2011 = df_st_LD_2011.loc[:,"Total"]

s11_37 = np.sum(t_LD_2011)
s11_37
Out[3229]:
0
In [3230]:
df_st_MP_2011 = df_2011.loc[(df_2011["State"]=="MADHYA PRADESH")]

df_st_MP_2011
Out[3230]:
State Year Type Gender Age_group Total
116368 MADHYA PRADESH 2011 Bankruptcy or Sudden change in Economic Male 60+ 4
117700 MADHYA PRADESH 2011 Dowry Dispute Male 15-29 2
117701 MADHYA PRADESH 2011 Ideological Causes/Hero Worshipping Female 45-59 0
117702 MADHYA PRADESH 2011 Others Male 15-29 217
117703 MADHYA PRADESH 2011 Other Prolonged Illness Male 15-29 190
... ... ... ... ... ... ...
233392 MADHYA PRADESH 2011 By Jumping off Moving Vehicles/Trains Male 60+ 2
233393 MADHYA PRADESH 2011 Others Female 30-44 51
233394 MADHYA PRADESH 2011 By touching electric wires Male 30-44 19
233395 MADHYA PRADESH 2011 Others Male 15-29 330
233396 MADHYA PRADESH 2011 Self-employed (Business activity) Male 45-59 90

566 rows × 6 columns

In [3231]:
t_MP_2011 = df_st_MP_2011.loc[:,"Total"]

s11_38 = np.sum(t_MP_2011)
s11_38
Out[3231]:
46295
In [3232]:
df_st_MH_2011 = df_2011.loc[(df_2011["State"]=="MAHARASHTRA")]

df_st_MH_2011
Out[3232]:
State Year Type Gender Age_group Total
123265 MAHARASHTRA 2011 Divorce Male 15-29 5
123266 MAHARASHTRA 2011 Failure in Examination Male 15-29 147
123267 MAHARASHTRA 2011 Fall in Social Reputation Male 15-29 14
123268 MAHARASHTRA 2011 Love Affairs Male 60+ 0
123269 MAHARASHTRA 2011 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
... ... ... ... ... ... ...
233623 MAHARASHTRA 2011 Others Female 0-14 5
233624 MAHARASHTRA 2011 Others Female 15-29 14
233625 MAHARASHTRA 2011 Public Sector Undertaking Male 15-29 19
233626 MAHARASHTRA 2011 Self-employed (Business activity) Female 30-44 14
233627 MAHARASHTRA 2011 Service (Private) Female 30-44 46

566 rows × 6 columns

In [3233]:
t_MH_2011 = df_st_MH_2011.loc[:,"Total"]

s11_39 = np.sum(t_MH_2011)
s11_39
Out[3233]:
79735
In [3234]:
df_st_MN_2011 = df_2011.loc[(df_2011["State"]=="MANIPUR")]

df_st_MN_2011
Out[3234]:
State Year Type Gender Age_group Total
127690 MANIPUR 2011 Bankruptcy or Sudden change in Economic Female 45-59 0
127691 MANIPUR 2011 Cancellation/Non-Settlement of Marriage Female 30-44 0
127692 MANIPUR 2011 Causes Not known Female 60+ 0
127693 MANIPUR 2011 Death of Dear Person Female 0-14 0
127694 MANIPUR 2011 Failure in Examination Female 15-29 0
... ... ... ... ... ... ...
233823 MANIPUR 2011 Others Female 15-29 5
233824 MANIPUR 2011 Professional Activity Female 45-59 0
233825 MANIPUR 2011 Self-employed (Business activity) Female 45-59 0
233826 MANIPUR 2011 Student Male 45-59 0
233827 MANIPUR 2011 Divorcee Female 0-100+ 0

559 rows × 6 columns

In [3235]:
t_MN_2011 = df_st_MN_2011.loc[:,"Total"]

s11_40 = np.sum(t_MN_2011)
s11_40
Out[3235]:
165
In [3236]:
df_st_MG_2011 = df_2011.loc[(df_2011["State"]=="MEGHALAYA")]

df_st_MG_2011
Out[3236]:
State Year Type Gender Age_group Total
132959 MEGHALAYA 2011 Causes Not known Male 0-14 3
132960 MEGHALAYA 2011 Death of Dear Person Male 30-44 0
132961 MEGHALAYA 2011 Not having Children(Barrenness/Impotency Female 45-59 0
132962 MEGHALAYA 2011 Public Sector Undertaking Male 15-29 0
132963 MEGHALAYA 2011 Self-employed (Business activity) Male 0-14 0
... ... ... ... ... ... ...
234006 MEGHALAYA 2011 By Over Alcoholism Male 0-14 0
234007 MEGHALAYA 2011 By touching electric wires Male 15-29 0
234008 MEGHALAYA 2011 Self-employed (Business activity) Female 45-59 0
234009 MEGHALAYA 2011 Student Male 45-59 0
234010 MEGHALAYA 2011 Divorcee Female 0-100+ 0

562 rows × 6 columns

In [3237]:
t_MG_2011 = df_st_MG_2011.loc[:,"Total"]

s11_41 = np.sum(t_MG_2011)
s11_41
Out[3237]:
761
In [3238]:
df_st_MZ_2011 = df_2011.loc[(df_2011["State"]=="MIZORAM")]

df_st_MZ_2011
Out[3238]:
State Year Type Gender Age_group Total
140193 MIZORAM 2011 Fall in Social Reputation Male 15-29 0
140194 MIZORAM 2011 Family Problems Female 15-29 0
140195 MIZORAM 2011 Love Affairs Female 60+ 0
140196 MIZORAM 2011 Not having Children(Barrenness/Impotency Female 45-59 0
140197 MIZORAM 2011 Paralysis Female 30-44 0
... ... ... ... ... ... ...
234245 MIZORAM 2011 By Overdose of sleeping pills Male 60+ 0
234246 MIZORAM 2011 By Self Infliction of injury Male 15-29 0
234247 MIZORAM 2011 By Self Infliction of injury Male 60+ 0
234248 MIZORAM 2011 Public Sector Undertaking Female 15-29 1
234249 MIZORAM 2011 Retired Person Female 45-59 0

560 rows × 6 columns

In [3239]:
t_MN_2011 = df_st_MN_2011.loc[:,"Total"]

s11_42 = np.sum(t_MN_2011)
s11_42
Out[3239]:
165
In [3240]:
df_st_NG_2011 = df_2011.loc[(df_2011["State"]=="NAGALAND")]

df_st_NG_2011
Out[3240]:
State Year Type Gender Age_group Total
144707 NAGALAND 2011 Bankruptcy or Sudden change in Economic Female 0-14 0
144708 NAGALAND 2011 Death of Dear Person Male 0-14 0
144709 NAGALAND 2011 Failure in Examination Male 30-44 0
144710 NAGALAND 2011 Love Affairs Female 15-29 0
144711 NAGALAND 2011 Others Male 30-44 3
... ... ... ... ... ... ...
234429 NAGALAND 2011 Professional Activity Female 60+ 0
234430 NAGALAND 2011 Retired Person Male 0-14 0
234431 NAGALAND 2011 Service (Government) Female 60+ 0
234432 NAGALAND 2011 Student Male 15-29 0
234433 NAGALAND 2011 Unemployed Male 15-29 0

559 rows × 6 columns

In [3241]:
t_NG_2011 = df_st_NG_2011.loc[:,"Total"]

s11_43 = np.sum(t_NG_2011)
s11_43
Out[3241]:
165
In [3242]:
df_st_OD_2011 = df_2011.loc[(df_2011["State"]=="ODISHA")]

df_st_OD_2011
Out[3242]:
State Year Type Gender Age_group Total
151326 ODISHA 2011 Bankruptcy or Sudden change in Economic Male 15-29 0
151327 ODISHA 2011 Divorce Male 30-44 0
151328 ODISHA 2011 Family Problems Female 15-29 118
151329 ODISHA 2011 Illness (Aids/STD) Male 45-59 3
151330 ODISHA 2011 Insanity/Mental Illness Female 60+ 6
... ... ... ... ... ... ...
234635 ODISHA 2011 Professional Activity Male 45-59 17
234636 ODISHA 2011 Public Sector Undertaking Male 45-59 23
234637 ODISHA 2011 Service (Private) Male 30-44 154
234638 ODISHA 2011 Student Female 0-14 37
234639 ODISHA 2011 Unemployed Female 45-59 19

566 rows × 6 columns

In [3243]:
t_OD_2011 = df_st_OD_2011.loc[:,"Total"]

s11_44 = np.sum(t_OD_2011)
s11_44
Out[3243]:
26205
In [3244]:
df_st_PD_2011 = df_2011.loc[(df_2011["State"]=="PUDUCHERRY")]

df_st_PD_2011
Out[3244]:
State Year Type Gender Age_group Total
155591 PUDUCHERRY 2011 Bankruptcy or Sudden change in Economic Female 30-44 0
155592 PUDUCHERRY 2011 Bankruptcy or Sudden change in Economic Male 60+ 0
155593 PUDUCHERRY 2011 Cancer Male 0-14 0
155594 PUDUCHERRY 2011 Causes Not known Male 30-44 4
155595 PUDUCHERRY 2011 Causes Not known Male 45-59 2
... ... ... ... ... ... ...
234858 PUDUCHERRY 2011 By Hanging Female 0-14 6
234859 PUDUCHERRY 2011 By Jumping from (Building) Female 0-14 0
234860 PUDUCHERRY 2011 Others Female 30-44 0
234861 PUDUCHERRY 2011 Service (Government) Male 0-14 0
234862 PUDUCHERRY 2011 Service (Private) Male 30-44 12

560 rows × 6 columns

In [3245]:
t_PD_2011 = df_st_PD_2011.loc[:,"Total"]

s11_45 = np.sum(t_PD_2011)
s11_45
Out[3245]:
2785
In [3246]:
df_st_PB_2011 = df_2011.loc[(df_2011["State"]=="PUNJAB")]

df_st_PB_2011
Out[3246]:
State Year Type Gender Age_group Total
162265 PUNJAB 2011 Bankruptcy or Sudden change in Economic Male 30-44 2
162266 PUNJAB 2011 Dowry Dispute Female 30-44 8
162267 PUNJAB 2011 Fall in Social Reputation Male 45-59 2
162268 PUNJAB 2011 Family Problems Male 45-59 16
162269 PUNJAB 2011 Illness (Aids/STD) Male 45-59 1
... ... ... ... ... ... ...
235042 PUNJAB 2011 By Self Infliction of injury Male 15-29 4
235043 PUNJAB 2011 Others Male 30-44 67
235044 PUNJAB 2011 Self-employed (Business activity) Male 60+ 1
235045 PUNJAB 2011 Service (Private) Female 0-14 0
235046 PUNJAB 2011 Student Female 30-44 0

563 rows × 6 columns

In [3247]:
t_PB_2011 = df_st_PB_2011.loc[:,"Total"]

s11_46 = np.sum(t_PB_2011)
s11_46
Out[3247]:
4830
In [3248]:
df_st_RJ_2011 = df_2011.loc[(df_2011["State"]=="RAJASTHAN")]

df_st_RJ_2011
Out[3248]:
State Year Type Gender Age_group Total
167069 RAJASTHAN 2011 Divorce Female 45-59 0
167070 RAJASTHAN 2011 Failure in Examination Female 30-44 2
167071 RAJASTHAN 2011 Ideological Causes/Hero Worshipping Female 30-44 0
167072 RAJASTHAN 2011 Physical Abuse (Rape/Incest Etc.) Male 0-14 0
167073 RAJASTHAN 2011 Suspected/Illicit Relation Female 60+ 0
... ... ... ... ... ... ...
235249 RAJASTHAN 2011 By Fire/Self Immolation Female 15-29 72
235250 RAJASTHAN 2011 By Machine Female 0-14 0
235251 RAJASTHAN 2011 Farming/Agriculture Activity Female 45-59 8
235252 RAJASTHAN 2011 House Wife Female 45-59 101
235253 RAJASTHAN 2011 Retired Person Male 45-59 3

566 rows × 6 columns

In [3249]:
t_RJ_2011 = df_st_RJ_2011.loc[:,"Total"]

s11_47 = np.sum(t_RJ_2011)
s11_47
Out[3249]:
21740
In [3250]:
df_st_SM_2011 = df_2011.loc[(df_2011["State"]=="SIKKIM")]

df_st_SM_2011
Out[3250]:
State Year Type Gender Age_group Total
173280 SIKKIM 2011 Cancer Female 0-14 0
173281 SIKKIM 2011 Divorce Male 15-29 0
173282 SIKKIM 2011 Drug Abuse/Addiction Female 60+ 0
173283 SIKKIM 2011 Failure in Examination Male 15-29 0
173284 SIKKIM 2011 Failure in Examination Male 60+ 0
... ... ... ... ... ... ...
235493 SIKKIM 2011 By Jumping from (Other sites) Female 60+ 0
235494 SIKKIM 2011 By Machine Female 45-59 0
235495 SIKKIM 2011 By touching electric wires Female 15-29 0
235496 SIKKIM 2011 By touching electric wires Female 60+ 0
235497 SIKKIM 2011 Unemployed Female 0-14 0

565 rows × 6 columns

In [3251]:
t_SM_2011 = df_st_SM_2011.loc[:,"Total"]

s11_48 = np.sum(t_SM_2011)
s11_48
Out[3251]:
916
In [3252]:
df_st_TN_2011 = df_2011.loc[(df_2011["State"]=="TAMIL NADU")]

df_st_TN_2011
Out[3252]:
State Year Type Gender Age_group Total
177190 TAMIL NADU 2011 Cancellation/Non-Settlement of Marriage Male 45-59 4
177191 TAMIL NADU 2011 Death of Dear Person Female 60+ 4
177192 TAMIL NADU 2011 Dowry Dispute Female 30-44 31
177193 TAMIL NADU 2011 Insanity/Mental Illness Female 45-59 49
177842 TAMIL NADU 2011 Bankruptcy or Sudden change in Economic Male 15-29 13
... ... ... ... ... ... ...
235702 TAMIL NADU 2011 By Drowning Male 30-44 208
235703 TAMIL NADU 2011 By Fire/Self Immolation Male 0-14 21
235704 TAMIL NADU 2011 By Jumping from (Other sites) Female 0-14 1
235705 TAMIL NADU 2011 Farming/Agriculture Activity Male 0-14 3
235706 TAMIL NADU 2011 Retired Person Female 0-14 0

566 rows × 6 columns

In [3253]:
t_TN_2011 = df_st_TN_2011.loc[:,"Total"]

s11_49 = np.sum(t_TN_2011)
s11_49
Out[3253]:
79815
In [3254]:
df_st_TP_2011 = df_2011.loc[(df_2011["State"]=="TRIPURA")]

df_st_TP_2011
Out[3254]:
State Year Type Gender Age_group Total
183467 TRIPURA 2011 Bankruptcy or Sudden change in Economic Male 0-14 0
183468 TRIPURA 2011 Causes Not known Male 15-29 58
183469 TRIPURA 2011 Causes Not known Male 60+ 19
183470 TRIPURA 2011 Others Male 15-29 44
183471 TRIPURA 2011 Paralysis Male 60+ 0
... ... ... ... ... ... ...
235912 TRIPURA 2011 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
235913 TRIPURA 2011 By Machine Female 30-44 0
235914 TRIPURA 2011 Farming/Agriculture Activity Male 0-14 0
235915 TRIPURA 2011 Retired Person Female 15-29 0
235916 TRIPURA 2011 Retired Person Female 60+ 0

564 rows × 6 columns

In [3255]:
t_TP_2011 = df_st_TP_2011.loc[:,"Total"]

s11_50 = np.sum(t_TP_2011)
s11_50
Out[3255]:
3515
In [3256]:
df_st_UP_2011 = df_2011.loc[(df_2011["State"]=="UTTAR PRADESH")]

df_st_UP_2011
Out[3256]:
State Year Type Gender Age_group Total
187827 UTTAR PRADESH 2011 Cancellation/Non-Settlement of Marriage Male 45-59 1
187828 UTTAR PRADESH 2011 Drug Abuse/Addiction Male 15-29 33
187829 UTTAR PRADESH 2011 Family Problems Female 45-59 73
187830 UTTAR PRADESH 2011 Ideological Causes/Hero Worshipping Female 45-59 0
187831 UTTAR PRADESH 2011 Not having Children(Barrenness/Impotency Female 45-59 2
... ... ... ... ... ... ...
236109 UTTAR PRADESH 2011 House Wife Female 45-59 109
236110 UTTAR PRADESH 2011 Others Male 45-59 117
236111 UTTAR PRADESH 2011 Professional Activity Female 45-59 2
236112 UTTAR PRADESH 2011 Public Sector Undertaking Male 0-14 0
236113 UTTAR PRADESH 2011 Student Male 0-14 17

564 rows × 6 columns

In [3257]:
t_UP_2011 = df_st_UP_2011.loc[:,"Total"]

s11_51 = np.sum(t_UP_2011)
s11_51
Out[3257]:
24195
In [3258]:
df_st_UK_2011 = df_2011.loc[(df_2011["State"]=="UTTARAKHAND")]

df_st_UK_2011
Out[3258]:
State Year Type Gender Age_group Total
194634 UTTARAKHAND 2011 Bankruptcy or Sudden change in Economic Female 15-29 0
194635 UTTARAKHAND 2011 Bankruptcy or Sudden change in Economic Male 15-29 1
194636 UTTARAKHAND 2011 Divorce Female 30-44 4
194637 UTTARAKHAND 2011 Dowry Dispute Female 30-44 2
194638 UTTARAKHAND 2011 Failure in Examination Female 30-44 0
... ... ... ... ... ... ...
236337 UTTARAKHAND 2011 By Self Infliction of injury Male 15-29 1
236338 UTTARAKHAND 2011 By Self Infliction of injury Male 60+ 1
236339 UTTARAKHAND 2011 Retired Person Female 30-44 0
236340 UTTARAKHAND 2011 Service (Government) Male 15-29 5
236341 UTTARAKHAND 2011 Service (Private) Female 0-14 0

564 rows × 6 columns

In [3259]:
t_UK_2011 = df_st_UK_2011.loc[:,"Total"]

s11_52 = np.sum(t_UK_2011)
s11_52
Out[3259]:
1585
In [3260]:
df_st_WB_2011 = df_2011.loc[(df_2011["State"]=="WEST BENGAL")]

df_st_WB_2011
Out[3260]:
State Year Type Gender Age_group Total
198468 WEST BENGAL 2011 Death of Dear Person Male 30-44 5
198469 WEST BENGAL 2011 Family Problems Male 15-29 393
198470 WEST BENGAL 2011 Other Prolonged Illness Female 60+ 29
198471 WEST BENGAL 2011 No Education Male 0-100+ 1272
198472 WEST BENGAL 2011 By Fire/Self Immolation Male 0-14 3
... ... ... ... ... ... ...
236566 WEST BENGAL 2011 Others Male 60+ 195
236567 WEST BENGAL 2011 Public Sector Undertaking Female 30-44 61
236568 WEST BENGAL 2011 Public Sector Undertaking Male 30-44 245
236569 WEST BENGAL 2011 Service (Government) Male 60+ 1
236570 WEST BENGAL 2011 Unemployed Female 60+ 6

566 rows × 6 columns

In [3261]:
t_WB_2011 = df_st_WB_2011.loc[:,"Total"]

s11_53 = np.sum(t_WB_2011)
s11_53
Out[3261]:
82460
In [3262]:
t_ANm_2011 = np.sum(df_st_AN_2011.where(df_st_AN_2011["Gender"]=="Male")["Total"])
t_ANm_2011
Out[3262]:
470.0
In [3263]:
t_ANfm_2011 = np.sum(df_st_AN_2011.where(df_st_AN_2011["Gender"]=="Female")["Total"])
t_ANfm_2011
Out[3263]:
210.0
In [3264]:
t_APm_2011 = np.sum(df_st_AP_2011.where(df_st_AP_2011["Gender"]=="Male")["Total"])
t_APm_2011
Out[3264]:
50600.0
In [3265]:
t_APfm_2011 = np.sum(df_st_AP_2011.where(df_st_AP_2011["Gender"]=="Female")["Total"])
t_APfm_2011
Out[3265]:
24785.0
In [3266]:
t_ARPm_2011 = np.sum(df_st_ARP_2011.where(df_st_ARP_2011["Gender"]=="Male")["Total"])
t_ARPm_2011
Out[3266]:
495.0
In [3267]:
t_ARPfm_2011 = np.sum(df_st_ARP_2011.where(df_st_ARP_2011["Gender"]=="Female")["Total"])
t_ARPfm_2011
Out[3267]:
175.0
In [3268]:
t_ASm_2011 = np.sum(df_st_AS_2011.where(df_st_AS_2011["Gender"]=="Male")["Total"])
t_ASm_2011
Out[3268]:
9130.0
In [3269]:
t_ASfm_2011 = np.sum(df_st_AS_2011.where(df_st_AS_2011["Gender"]=="Female")["Total"])
t_ASfm_2011
Out[3269]:
4500.0
In [3270]:
t_BHm_2011 = np.sum(df_st_BH_2011.where(df_st_BH_2011["Gender"]=="Male")["Total"])
t_BHm_2011
Out[3270]:
2230.0
In [3271]:
t_BHfm_2011 = np.sum(df_st_BH_2011.where(df_st_BH_2011["Gender"]=="Female")["Total"])
t_BHfm_2011
Out[3271]:
1745.0
In [3272]:
t_CHm_2011 = np.sum(df_st_CH_2011.where(df_st_CH_2011["Gender"]=="Male")["Total"])
t_CHm_2011
Out[3272]:
285.0
In [3273]:
t_CHfm_2011 = np.sum(df_st_CH_2011.where(df_st_CH_2011["Gender"]=="Female")["Total"])
t_CHfm_2011
Out[3273]:
240.0
In [3274]:
t_CTm_2011 = np.sum(df_st_CT_2011.where(df_st_CT_2011["Gender"]=="Male")["Total"])
t_CTm_2011
Out[3274]:
22635.0
In [3275]:
t_CTfm_2011 = np.sum(df_st_CT_2011.where(df_st_CT_2011["Gender"]=="Female")["Total"])
t_CTfm_2011
Out[3275]:
11145.0
In [3276]:
t_DNm_2011 = np.sum(df_st_DN_2011.where(df_st_DN_2011["Gender"]=="Male")["Total"])
t_DNm_2011
Out[3276]:
205.0
In [3277]:
t_DNfm_2011 = np.sum(df_st_DN_2011.where(df_st_DN_2011["Gender"]=="Female")["Total"])
t_DNfm_2011
Out[3277]:
110.0
In [3278]:
t_DDm_2011 = np.sum(df_st_DD_2011.where(df_st_DD_2011["Gender"]=="Male")["Total"])
t_DDm_2011
Out[3278]:
90.0
In [3279]:
t_DDfm_2011 = np.sum(df_st_DD_2011.where(df_st_DD_2011["Gender"]=="Female")["Total"])
t_DDfm_2011
Out[3279]:
75.0
In [3280]:
t_DLm_2011 = np.sum(df_st_DL_2011.where(df_st_DL_2011["Gender"]=="Male")["Total"])
t_DLm_2011
Out[3280]:
5840.0
In [3281]:
t_DLfm_2011 = np.sum(df_st_DL_2011.where(df_st_DL_2011["Gender"]=="Female")["Total"])
t_DLfm_2011
Out[3281]:
2740.0
In [3282]:
t_GOAm_2011 = np.sum(df_st_GOA_2011.where(df_st_GOA_2011["Gender"]=="Male")["Total"])
t_GOAm_2011
Out[3282]:
975.0
In [3283]:
t_GOAfm_2011 = np.sum(df_st_GOA_2011.where(df_st_GOA_2011["Gender"]=="Female")["Total"])
t_GOAfm_2011
Out[3283]:
490.0
In [3284]:
t_GJm_2011 = np.sum(df_st_GJ_2011.where(df_st_GJ_2011["Gender"]=="Male")["Total"])
t_GJm_2011
Out[3284]:
19560.0
In [3285]:
t_GJfm_2011 = np.sum(df_st_GJ_2011.where(df_st_GJ_2011["Gender"]=="Female")["Total"])
t_GJfm_2011
Out[3285]:
12350.0
In [3286]:
t_HRm_2011 = np.sum(df_st_HR_2011.where(df_st_HR_2011["Gender"]=="Male")["Total"])
t_HRm_2011
Out[3286]:
12320.0
In [3287]:
t_HRfm_2011 = np.sum(df_st_HR_2011.where(df_st_HR_2011["Gender"]=="Female")["Total"])
t_HRfm_2011
Out[3287]:
3905.0
In [3288]:
t_HPm_2011 = np.sum(df_st_HP_2011.where(df_st_HP_2011["Gender"]=="Male")["Total"])
t_HPm_2011
Out[3288]:
1345.0
In [3289]:
t_HPfm_2011 = np.sum(df_st_HP_2011.where(df_st_HP_2011["Gender"]=="Female")["Total"])
t_HPfm_2011
Out[3289]:
869.0
In [3290]:
t_JKm_2011 = np.sum(df_st_JK_2011.where(df_st_JK_2011["Gender"]=="Male")["Total"])
t_JKm_2011
Out[3290]:
719.0
In [3291]:
t_JKfm_2011 = np.sum(df_st_JK_2011.where(df_st_JK_2011["Gender"]=="Female")["Total"])
t_JKfm_2011
Out[3291]:
713.0
In [3292]:
t_JHm_2011 = np.sum(df_st_JH_2011.where(df_st_JH_2011["Gender"]=="Male")["Total"])
t_JHm_2011
Out[3292]:
4125.0
In [3562]:
t_JHfm_2011 = np.sum(df_st_JH_2011.where(df_st_JH_2011["Gender"]=="Female")["Total"])
t_JHfm_2011
Out[3562]:
1935.0
In [3563]:
t_KNm_2011 = np.sum(df_st_KN_2011.where(df_st_KN_2011["Gender"]=="Male")["Total"])
t_KNm_2011
Out[3563]:
42360.0
In [3564]:
t_KNfm_2011 = np.sum(df_st_KN_2011.where(df_st_KN_2011["Gender"]=="Female")["Total"])
t_KNfm_2011
Out[3564]:
20750.0
In [3565]:
t_KERm_2011 = np.sum(df_st_KER_2011.where(df_st_KER_2011["Gender"]=="Male")["Total"])
t_KERm_2011
Out[3565]:
30328.0
In [3566]:
t_KERfm_2011 = np.sum(df_st_KER_2011.where(df_st_KER_2011["Gender"]=="Female")["Total"])
t_KERfm_2011
Out[3566]:
11093.0
In [3567]:
t_LDm_2011 = np.sum(df_st_LD_2011.where(df_st_LD_2011["Gender"]=="Male")["Total"])
t_LDm_2011
Out[3567]:
0.0
In [3568]:
t_LDfm_2011 = np.sum(df_st_LD_2011.where(df_st_LD_2011["Gender"]=="Female")["Total"])
t_LDfm_2011
Out[3568]:
0.0
In [3569]:
t_MPm_2011 = np.sum(df_st_MP_2011.where(df_st_MP_2011["Gender"]=="Male")["Total"])
t_MPm_2011
Out[3569]:
26200.0
In [3570]:
t_MPfm_2011 = np.sum(df_st_MP_2011.where(df_st_MP_2011["Gender"]=="Female")["Total"])
t_MPfm_2011
Out[3570]:
20095.0
In [3571]:
t_MHm_2011 = np.sum(df_st_MH_2011.where(df_st_MH_2011["Gender"]=="Male")["Total"])
t_MHm_2011
Out[3571]:
54435.0
In [3572]:
t_MHfm_2011 = np.sum(df_st_MH_2011.where(df_st_MH_2011["Gender"]=="Female")["Total"])
t_MHfm_2011
Out[3572]:
25300.0
In [3573]:
t_MNm_2011 = np.sum(df_st_MN_2011.where(df_st_MN_2011["Gender"]=="Male")["Total"])
t_MNm_2011
Out[3573]:
90.0
In [3574]:
t_MNfm_2011 = np.sum(df_st_MN_2011.where(df_st_MN_2011["Gender"]=="Female")["Total"])
t_MNfm_2011
Out[3574]:
75.0
In [3575]:
t_MGm_2011 = np.sum(df_st_MG_2011.where(df_st_MG_2011["Gender"]=="Male")["Total"])
t_MGm_2011
Out[3575]:
552.0
In [3576]:
t_MGfm_2011 = np.sum(df_st_MG_2011.where(df_st_MG_2011["Gender"]=="Female")["Total"])
t_MGfm_2011
Out[3576]:
209.0
In [3577]:
t_MZm_2011 = np.sum(df_st_MZ_2011.where(df_st_MZ_2011["Gender"]=="Male")["Total"])
t_MZm_2011
Out[3577]:
385.0
In [3578]:
t_MZfm_2011 = np.sum(df_st_MZ_2011.where(df_st_MZ_2011["Gender"]=="Female")["Total"])
t_MZfm_2011
Out[3578]:
65.0
In [3579]:
t_NGm_2011 = np.sum(df_st_NG_2011.where(df_st_NG_2011["Gender"]=="Male")["Total"])
t_NGm_2011
Out[3579]:
125.0
In [3580]:
t_NGfm_2011 = np.sum(df_st_NG_2011.where(df_st_NG_2011["Gender"]=="Female")["Total"])
t_MGfm_2011
Out[3580]:
209.0
In [3581]:
t_ODm_2011 = np.sum(df_st_OD_2011.where(df_st_OD_2011["Gender"]=="Male")["Total"])
t_ODm_2011
Out[3581]:
15300.0
In [3582]:
t_ODfm_2011 = np.sum(df_st_OD_2011.where(df_st_OD_2011["Gender"]=="Female")["Total"])
t_ODfm_2011
Out[3582]:
10905.0
In [3583]:
t_PDm_2011 = np.sum(df_st_PD_2011.where(df_st_PD_2011["Gender"]=="Male")["Total"])
t_PDm_2011
Out[3583]:
1980.0
In [3584]:
t_PDfm_2011 = np.sum(df_st_PD_2011.where(df_st_PD_2011["Gender"]=="Female")["Total"])
t_PDfm_2011
Out[3584]:
805.0
In [3585]:
t_PBm_2011 = np.sum(df_st_PB_2011.where(df_st_PB_2011["Gender"]=="Male")["Total"])
t_PBm_2011
Out[3585]:
3775.0
In [3586]:
t_PBfm_2011 = np.sum(df_st_PB_2011.where(df_st_PB_2011["Gender"]=="Female")["Total"])
t_PBfm_2011
Out[3586]:
1055.0
In [3587]:
t_RJm_2011 = np.sum(df_st_RJ_2011.where(df_st_RJ_2011["Gender"]=="Male")["Total"])
t_RJm_2011
Out[3587]:
15080.0
In [3588]:
t_RJfm_2011 = np.sum(df_st_RJ_2011.where(df_st_RJ_2011["Gender"]=="Female")["Total"])
t_RJfm_2011
Out[3588]:
6660.0
In [3589]:
t_SMm_2011 = np.sum(df_st_SM_2011.where(df_st_SM_2011["Gender"]=="Male")["Total"])
t_SMm_2011
Out[3589]:
531.0
In [3590]:
t_SMfm_2011 = np.sum(df_st_SM_2011.where(df_st_SM_2011["Gender"]=="Female")["Total"])
t_SMfm_2011
Out[3590]:
385.0
In [3591]:
t_TNm_2011 = np.sum(df_st_TN_2011.where(df_st_TN_2011["Gender"]=="Male")["Total"])
t_TNm_2011
Out[3591]:
51410.0
In [3592]:
t_TNfm_2011 = np.sum(df_st_TN_2011.where(df_st_TN_2011["Gender"]=="Female")["Total"])
t_TNfm_2011
Out[3592]:
28405.0
In [3593]:
t_TPm_2011 = np.sum(df_st_TP_2011.where(df_st_TP_2011["Gender"]=="Male")["Total"])
t_TPm_2011
Out[3593]:
2235.0
In [3594]:
t_TPfm_2011 = np.sum(df_st_TP_2011.where(df_st_TP_2011["Gender"]=="Female")["Total"])
t_TPfm_2011
Out[3594]:
1280.0
In [3595]:
t_UPm_2011 = np.sum(df_st_UP_2011.where(df_st_UP_2011["Gender"]=="Male")["Total"])
t_UPm_2011
Out[3595]:
13565.0
In [3596]:
t_UPfm_2011 = np.sum(df_st_UP_2011.where(df_st_UP_2011["Gender"]=="Female")["Total"])
t_UPfm_2011
Out[3596]:
10630.0
In [3597]:
t_UKm_2011 = np.sum(df_st_UK_2011.where(df_st_UK_2011["Gender"]=="Male")["Total"])
t_UKm_2011
Out[3597]:
960.0
In [3598]:
t_UKfm_2011 = np.sum(df_st_UK_2011.where(df_st_UK_2011["Gender"]=="Female")["Total"])
t_UKfm_2011
Out[3598]:
625.0
In [3599]:
t_WBm_2011 = np.sum(df_st_WB_2011.where(df_st_WB_2011["Gender"]=="Male")["Total"])
t_WBm_2011
Out[3599]:
48120.0
In [3600]:
t_WBfm_2011 = np.sum(df_st_WB_2011.where(df_st_WB_2011["Gender"]=="Female")["Total"])
t_WBfm_2011
Out[3600]:
34340.0
In [3601]:
l_2011=list(df_2011.loc[:,"Type"].unique())
l_2011.sort()
print(l_2011,end=" ")
['Bankruptcy or Sudden change in Economic', 'By Consuming Insecticides', 'By Consuming Other Poison', 'By Drowning', 'By Fire-Arms', 'By Fire/Self Immolation', 'By Hanging', 'By Jumping from (Building)', 'By Jumping from (Other sites)', 'By Jumping off Moving Vehicles/Trains', 'By Machine', 'By Over Alcoholism', 'By Overdose of sleeping pills', 'By Self Infliction of injury', 'By coming under running vehicles/trains', 'By touching electric wires', 'Cancellation/Non-Settlement of Marriage', 'Cancer', 'Causes Not known', 'Death of Dear Person', 'Diploma', 'Divorce', 'Divorcee', 'Dowry Dispute', 'Drug Abuse/Addiction', 'Failure in Examination', 'Fall in Social Reputation', 'Family Problems', 'Farming/Agriculture Activity', 'Graduate', 'House Wife', 'Hr. Secondary/Intermediate/Pre-Universit', 'Ideological Causes/Hero Worshipping', 'Illegitimate Pregnancy', 'Illness (Aids/STD)', 'Insanity/Mental Illness', 'Love Affairs', 'Married', 'Matriculate/Secondary', 'Middle', 'Never Married', 'No Education', 'Not having Children(Barrenness/Impotency', 'Other Prolonged Illness', 'Others', 'Paralysis', 'Physical Abuse (Rape/Incest Etc.)', 'Post Graduate and Above', 'Poverty', 'Primary', 'Professional Activity', 'Professional/Career Problem', 'Property Dispute', 'Public Sector Undertaking', 'Retired Person', 'Self-employed (Business activity)', 'Seperated', 'Service (Government)', 'Service (Private)', 'Student', 'Suspected/Illicit Relation', 'Unemployed', 'Unemployment', 'Widowed/Widower'] 
In [3602]:
cause_l_2011=[]
for i in l_2011:
    rough= np.sum(df_2011.where(df_2011["Type"]==i)["Total"])
    cause_l_2011.append(rough)

print(cause_l_2011,end=" ")
[2983.0, 21804.0, 21561.0, 8060.0, 402.0, 11866.0, 45015.0, 686.0, 618.0, 650.0, 132.0, 1389.0, 568.0, 481.0, 4846.0, 742.0, 1119.0, 624.0, 23024.0, 896.0, 1384.0, 448.0, 1283.0, 3239.0, 3658.0, 2381.0, 1160.0, 32909.0, 14027.0, 3422.0, 24596.0, 12231.0, 41.0, 184.0, 451.0, 8802.0, 4586.0, 95015.0, 25657.0, 32779.0, 30663.0, 27038.0, 707.0, 16154.0, 89759.0, 539.0, 286.0, 703.0, 2282.0, 32371.0, 4206.0, 1160.0, 1590.0, 2684.0, 857.0, 7176.0, 3704.0, 1626.0, 11172.0, 7696.0, 1395.0, 10419.0, 2333.0, 4920.0] 
In [3603]:
x1_2011 = set(df_2011.loc[:,"State"])
x1_2011
len(x1_2011)
Out[3603]:
35
In [3604]:
cause_df_2011 = pd.DataFrame(cause_l_2011,l_2011)
cause_df_2011.reset_index()
Out[3604]:
index 0
0 Bankruptcy or Sudden change in Economic 2983.0
1 By Consuming Insecticides 21804.0
2 By Consuming Other Poison 21561.0
3 By Drowning 8060.0
4 By Fire-Arms 402.0
... ... ...
59 Student 7696.0
60 Suspected/Illicit Relation 1395.0
61 Unemployed 10419.0
62 Unemployment 2333.0
63 Widowed/Widower 4920.0

64 rows × 2 columns

In [3605]:
cause_df_2011.plot.bar(stacked=True,figsize=(50,20))
plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("Causes",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths due to Different Causes in 2011",fontsize=55)
plt.legend(["Death Count"], prop={"size":30})
Out[3605]:
<matplotlib.legend.Legend at 0x10db0e20>
In [3606]:
s_2011=list(df_2011.loc[:,"State"].unique())
s_2011.sort()
print(s_2011,end=" ")
['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH', 'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR', 'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA', 'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA', 'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'] 
In [3607]:
state_s_2011 = [s11_19,s11_20,s11_21,s11_22,s11_23,s11_24,s11_25,s11_26,s11_27,s11_28,s11_29,s11_30,s11_31,s11_32,s11_33,s11_34,
           s11_35,s11_36,s11_37,s11_38,s11_39,s11_40,s11_41,s11_42,s11_43,s11_44,s11_45,s11_46,s11_47,s11_48,s11_49,s11_50,
           s11_51,s11_52,s11_53]
print(state_s_2011,end=" ")
[680, 75385, 670, 13630, 3975, 525, 33780, 315, 165, 8580, 1465, 31910, 16225, 2214, 1432, 6060, 63110, 41421, 0, 46295, 79735, 165, 761, 165, 165, 26205, 2785, 4830, 21740, 916, 79815, 3515, 24195, 1585, 82460] 
In [3608]:
state_m_2011=[t_ANm_2011, t_APm_2011, t_ARPm_2011, t_ASm_2011, t_BHm_2011, t_CHm_2011, t_CTm_2011, t_DNm_2011,
             t_DDm_2011, t_DLm_2011, t_GOAm_2011, t_GJm_2011, t_HRm_2011, t_HPm_2011,t_JKm_2011, t_JHm_2011,
             t_KNm_2011, t_KERm_2011, t_LDm_2011,t_MPm_2011,t_MHm_2011,t_MNm_2011,t_MGm_2011,t_MZm_2011,
             t_NGm_2011, t_ODm_2011, t_PDm_2011,t_PBm_2011,t_RJm_2011,t_SMm_2011,t_TNm_2011,t_TPm_2011,
             t_UPm_2011, t_UKm_2011, t_WBm_2011]
print(state_m_2011,end=" ")
[470.0, 50600.0, 495.0, 9130.0, 2230.0, 285.0, 22635.0, 205.0, 90.0, 5840.0, 975.0, 19560.0, 12320.0, 1345.0, 719.0, 4125.0, 42360.0, 30328.0, 0.0, 26200.0, 54435.0, 90.0, 552.0, 385.0, 125.0, 15300.0, 1980.0, 3775.0, 15080.0, 531.0, 51410.0, 2235.0, 13565.0, 960.0, 48120.0] 
In [3609]:
state_fm_2011=[t_ANfm_2011, t_APfm_2011, t_ARPfm_2011, t_ASfm_2011, t_BHfm_2011, t_CHfm_2011, t_CTfm_2011, t_DNfm_2011,
             t_DDfm_2011, t_DLfm_2011, t_GOAfm_2011, t_GJfm_2011, t_HRfm_2011, t_HPfm_2011,t_JKfm_2011, t_JHfm_2011,
             t_KNfm_2011, t_KERfm_2011, t_LDfm_2011,t_MPfm_2011,t_MHfm_2011,t_MNfm_2011,t_MGfm_2011,t_MZfm_2011,
             t_NGfm_2011, t_ODfm_2011, t_PDfm_2011,t_PBfm_2011,t_RJfm_2011,t_SMfm_2011,t_TNfm_2011,t_TPfm_2011,
             t_UPfm_2011, t_UKfm_2011, t_WBfm_2011]
print(state_fm_2011,end=" ")
[210.0, 24785.0, 175.0, 4500.0, 1745.0, 240.0, 11145.0, 110.0, 75.0, 2740.0, 490.0, 12350.0, 3905.0, 869.0, 713.0, 1935.0, 20750.0, 11093.0, 0.0, 20095.0, 25300.0, 75.0, 209.0, 65.0, 40.0, 10905.0, 805.0, 1055.0, 6660.0, 385.0, 28405.0, 1280.0, 10630.0, 625.0, 34340.0] 
In [3610]:
df_state_2011 = {
    
    "State":['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH',
             'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR',
             'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA',
             'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA',
             'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'],
                   
    "Total":[s11_19,s11_20,s11_21,s11_22,s11_23,s11_24,s11_25,s11_26,s11_27,s11_28,s11_29,s11_30,s11_31,s11_32,s11_33,s11_34,
           s11_35,s11_36,s11_37,s11_38,s11_39,s11_40,s11_41,s11_42,s11_43,s11_44,s11_45,s11_46,s11_47,s11_48,s11_49,s11_50,
           s11_51,s11_52,s11_53],
       
    "Male":[t_ANm_2011, t_APm_2011, t_ARPm_2011, t_ASm_2011, t_BHm_2011, t_CHm_2011, t_CTm_2011, t_DNm_2011,
             t_DDm_2011, t_DLm_2011, t_GOAm_2011, t_GJm_2011, t_HRm_2011, t_HPm_2011,t_JKm_2011, t_JHm_2011,
             t_KNm_2011, t_KERm_2011, t_LDm_2011,t_MPm_2011,t_MHm_2011,t_MNm_2011,t_MGm_2011,t_MZm_2011,
             t_NGm_2011, t_ODm_2011, t_PDm_2011,t_PBm_2011,t_RJm_2011,t_SMm_2011,t_TNm_2011,t_TPm_2011,
             t_UPm_2011, t_UKm_2011, t_WBm_2011],
                 
    "Female":[t_ANfm_2011, t_APfm_2011, t_ARPfm_2011, t_ASfm_2011, t_BHfm_2011, t_CHfm_2011, t_CTfm_2011, t_DNfm_2011,
             t_DDfm_2011, t_DLfm_2011, t_GOAfm_2011, t_GJfm_2011, t_HRfm_2011, t_HPfm_2011,t_JKfm_2011, t_JHfm_2011,
             t_KNfm_2011, t_KERfm_2011, t_LDfm_2011,t_MPfm_2011,t_MHfm_2011,t_MNfm_2011,t_MGfm_2011,t_MZfm_2011,
             t_NGfm_2011, t_ODfm_2011, t_PDfm_2011,t_PBfm_2011,t_RJfm_2011,t_SMfm_2011,t_TNfm_2011,t_TPfm_2011,
             t_UPfm_2011, t_UKfm_2011, t_WBfm_2011]
                  

}

df_All_st_2011 = pd.DataFrame(df_state_2011)
df_All_st_2011
Out[3610]:
State Total Male Female
0 A & N ISLANDS 680 470.0 210.0
1 ANDHRA PRADESH 75385 50600.0 24785.0
2 ARUNACHAL PRADESH 670 495.0 175.0
3 ASSAM 13630 9130.0 4500.0
4 BIHAR 3975 2230.0 1745.0
5 CHANDIGARH 525 285.0 240.0
6 CHHATTISGARH 33780 22635.0 11145.0
7 D & N HAVELI 315 205.0 110.0
8 DAMAN & DIU 165 90.0 75.0
9 DELHI (UT) 8580 5840.0 2740.0
10 GOA 1465 975.0 490.0
11 GUJARAT 31910 19560.0 12350.0
12 HARYANA 16225 12320.0 3905.0
13 HIMACHAL PRADESH 2214 1345.0 869.0
14 JAMMU & KASHMIR 1432 719.0 713.0
15 JHARKHAND 6060 4125.0 1935.0
16 KARNATAKA 63110 42360.0 20750.0
17 KERALA 41421 30328.0 11093.0
18 LAKSHADWEEP 0 0.0 0.0
19 MADHYA PRADESH 46295 26200.0 20095.0
20 MAHARASHTRA 79735 54435.0 25300.0
21 MANIPUR 165 90.0 75.0
22 MEGHALAYA 761 552.0 209.0
23 MIZORAM 165 385.0 65.0
24 NAGALAND 165 125.0 40.0
25 ODISHA 26205 15300.0 10905.0
26 PUDUCHERRY 2785 1980.0 805.0
27 PUNJAB 4830 3775.0 1055.0
28 RAJASTHAN 21740 15080.0 6660.0
29 SIKKIM 916 531.0 385.0
30 TAMIL NADU 79815 51410.0 28405.0
31 TRIPURA 3515 2235.0 1280.0
32 UTTAR PRADESH 24195 13565.0 10630.0
33 UTTARAKHAND 1585 960.0 625.0
34 WEST BENGAL 82460 48120.0 34340.0
In [3611]:
pivot_2011 = pd.pivot_table(df_All_st_2011, values=None, index='State', columns=None,
                       fill_value=None, margins=False, dropna=True, margins_name='All', observed=False)

pivot_2011
Out[3611]:
Female Male Total
State
A & N ISLANDS 210.0 470.0 680
ANDHRA PRADESH 24785.0 50600.0 75385
ARUNACHAL PRADESH 175.0 495.0 670
ASSAM 4500.0 9130.0 13630
BIHAR 1745.0 2230.0 3975
CHANDIGARH 240.0 285.0 525
CHHATTISGARH 11145.0 22635.0 33780
D & N HAVELI 110.0 205.0 315
DAMAN & DIU 75.0 90.0 165
DELHI (UT) 2740.0 5840.0 8580
GOA 490.0 975.0 1465
GUJARAT 12350.0 19560.0 31910
HARYANA 3905.0 12320.0 16225
HIMACHAL PRADESH 869.0 1345.0 2214
JAMMU & KASHMIR 713.0 719.0 1432
JHARKHAND 1935.0 4125.0 6060
KARNATAKA 20750.0 42360.0 63110
KERALA 11093.0 30328.0 41421
LAKSHADWEEP 0.0 0.0 0
MADHYA PRADESH 20095.0 26200.0 46295
MAHARASHTRA 25300.0 54435.0 79735
MANIPUR 75.0 90.0 165
MEGHALAYA 209.0 552.0 761
MIZORAM 65.0 385.0 165
NAGALAND 40.0 125.0 165
ODISHA 10905.0 15300.0 26205
PUDUCHERRY 805.0 1980.0 2785
PUNJAB 1055.0 3775.0 4830
RAJASTHAN 6660.0 15080.0 21740
SIKKIM 385.0 531.0 916
TAMIL NADU 28405.0 51410.0 79815
TRIPURA 1280.0 2235.0 3515
UTTAR PRADESH 10630.0 13565.0 24195
UTTARAKHAND 625.0 960.0 1585
WEST BENGAL 34340.0 48120.0 82460
In [3612]:
pivot_2011.plot(kind='bar',figsize=(60,30))

plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("States",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths of Males And Females In Different State",fontsize=55)
plt.legend(["Female","Male","Total"], prop={"size":30})

plt.show
Out[3612]:
<function matplotlib.pyplot.show(close=None, block=None)>
In [3613]:
cause_l_percent_2011=[]
for i in cause_l_2011:
    p=i/np.sum(cause_l_2011)
    avg_2011_cause=p*100
    cause_l_percent_2011.append(avg_2011_cause)

print(cause_l_percent_2011,end=" ")
[0.44051692438555784, 3.2199232381168974, 3.184038017659073, 1.19026698308669, 0.05936567334998132, 1.752321094454921, 6.64762633295873, 0.10130560178628653, 0.0912636470902698, 0.09598927282957179, 0.01949320617462073, 0.20512169224657725, 0.08387985687261042, 0.07103206189388313, 0.715636947895546, 0.10957544683006502, 0.16524922507121664, 0.09214970191638891, 3.400087719427786, 0.13231752070045588, 0.20438331322481132, 0.06615876035022794, 0.18946805698513938, 0.4783219302999739, 0.5401980923239594, 0.3516160901649391, 0.17130393304969732, 4.8598630454590435, 2.071448507662159, 0.5053466024966071, 3.6322340838709963, 1.8062227630438348, 0.006054707978480681, 0.027172348000986474, 0.0666017877632875, 1.2998424299167552, 0.6772412387637172, 14.031416550618097, 3.7889181122897284, 4.840665190893128, 4.528183188881784, 3.9928583981014802, 0.10440679367770347, 2.3855549435213885, 13.255232522937742, 0.07959725854636798, 0.042235280045011585, 0.10381609046029071, 0.33699618553397354, 4.780413462717028, 0.621124433109506, 0.17130393304969732, 0.23480452892156792, 0.39636185888395487, 0.12655816433068157, 1.0597215720384725, 0.5469911793242059, 0.24012085787828266, 1.6498340862338094, 1.13651299030213, 0.20600774707269634, 1.538634205555859, 0.3445276515559861, 0.7265649574176818] 
In [3614]:
np.max(cause_l_percent_2011) #Married
Out[3614]:
14.031416550618097
In [3615]:
np.min(cause_l_percent_2011)  #Ideological Causes/Hero Worshipping
Out[3615]:
0.006054707978480681
In [3616]:
state_s_2011_percent=[]
tot=np.sum(state_s_2011)
for i in state_s_2011:
    xy=i/tot
    avg_state_2011=xy*100
    state_s_2011_percent.append(avg_state_2011)

print(state_s_2011_percent,end=" ")
[0.10046182893714341, 11.137227903568462, 0.09898444909983246, 2.013668718254801, 0.5872584853310956, 0.07756244145882395, 4.9905890904363295, 0.046537464875294365, 0.024376767315630384, 1.26759190041278, 0.21643614616605159, 4.714319060859185, 2.397048786036988, 0.3270918959806404, 0.21156079270292552, 0.895292181410425, 9.323744153269294, 6.119455024125613, 0.0, 6.839529956830962, 11.77988813279872, 0.024376767315630384, 0.11242860561936197, 0.024376767315630384, 0.024376767315630384, 3.8714738636732986, 0.4114502846910947, 0.7135744614211803, 3.211823766313967, 0.1353279930976814, 11.791707171497206, 0.5192990128147927, 3.5745205163738003, 0.23416470421378277, 12.182474138465949] 
In [3617]:
np.max(state_s_2011_percent) #Maharashtra
Out[3617]:
12.182474138465949
In [3618]:
np.min(state_s_2011_percent)  #Lakshdweep
Out[3618]:
0.0
In [3619]:
l_age_grp_2011=[s11_4,s11_5,s11_6,s11_7,s11_8,s11_54]
l_age_grp_2011
Out[3619]:
[9096, 144037, 138640, 81876, 32340, 271170]
In [3620]:
l_age_grp_2011_percent=[]
for i in l_age_grp_2011:
    yz=i/s11_1
    avg_2011_age_grp=yz*100
    l_age_grp_2011_percent.append(avg_2011_age_grp)
l_age_grp_2011_percent
Out[3620]:
[1.3432591163965923,
 21.27077983162005,
 20.473773515525895,
 12.091104157221569,
 4.775835512782079,
 40.04524786645381]
In [3621]:
np.max(l_age_grp_2011_percent)  #0-100+
Out[3621]:
40.04524786645381
In [3622]:
np.min(l_age_grp_2011_percent)  #0-14
Out[3622]:
1.3432591163965923
In [3623]:
total_male_percent_2011= (s11_2/s11_1)*100
total_male_percent_2011
Out[3623]:
64.74919479767676
In [3624]:
total_female_percent_2011= (s11_3/s11_1)*100
total_female_percent_2011
Out[3624]:
35.250805202323235
In [ ]:
 

2012

In [3625]:
df_2012 = suicide_df.loc[(suicide_df["Year"]==2012)]

df_2012
Out[3625]:
State Year Type Gender Age_group Total
2783 A & N ISLANDS 2012 Divorce Female 60+ 0
2784 A & N ISLANDS 2012 Failure in Examination Female 0-14 0
2785 A & N ISLANDS 2012 Failure in Examination Male 0-14 0
2786 A & N ISLANDS 2012 Fall in Social Reputation Female 45-59 0
2787 A & N ISLANDS 2012 Not having Children(Barrenness/Impotency Male 60+ 0
... ... ... ... ... ... ...
236578 WEST BENGAL 2012 Professional Activity Male 60+ 0
236579 WEST BENGAL 2012 Self-employed (Business activity) Male 0-14 0
236580 WEST BENGAL 2012 Service (Government) Male 15-29 0
236581 WEST BENGAL 2012 Service (Government) Male 60+ 0
236582 WEST BENGAL 2012 Never Married Male 0-100+ 2658

19721 rows × 6 columns

In [3626]:
t2012_dcount = df_2012.loc[:,"Total"]

s12_1 = np.sum(t2012_dcount)

s12_1
Out[3626]:
647288
In [3627]:
male_2012 = df_2012.loc[(df_2012["Gender"]=="Male")]

male_2012
Out[3627]:
State Year Type Gender Age_group Total
2785 A & N ISLANDS 2012 Failure in Examination Male 0-14 0
2787 A & N ISLANDS 2012 Not having Children(Barrenness/Impotency Male 60+ 0
2790 A & N ISLANDS 2012 By Consuming Insecticides Male 60+ 1
2791 A & N ISLANDS 2012 By Fire/Self Immolation Male 30-44 0
2792 A & N ISLANDS 2012 By Jumping off Moving Vehicles/Trains Male 15-29 0
... ... ... ... ... ... ...
236578 WEST BENGAL 2012 Professional Activity Male 60+ 0
236579 WEST BENGAL 2012 Self-employed (Business activity) Male 0-14 0
236580 WEST BENGAL 2012 Service (Government) Male 15-29 0
236581 WEST BENGAL 2012 Service (Government) Male 60+ 0
236582 WEST BENGAL 2012 Never Married Male 0-100+ 2658

9869 rows × 6 columns

In [3628]:
m2012_count = male_2012.loc[:,"Total"]
s12_2 = np.sum(m2012_count)

s12_2
Out[3628]:
424890
In [3629]:
female_2012 = df_2012.loc[(df_2012["Gender"]=="Female")]

female_2012
Out[3629]:
State Year Type Gender Age_group Total
2783 A & N ISLANDS 2012 Divorce Female 60+ 0
2784 A & N ISLANDS 2012 Failure in Examination Female 0-14 0
2786 A & N ISLANDS 2012 Fall in Social Reputation Female 45-59 0
2788 A & N ISLANDS 2012 Others Female 30-44 5
2789 A & N ISLANDS 2012 Suspected/Illicit Relation Female 60+ 0
... ... ... ... ... ... ...
236353 UTTARAKHAND 2012 By Over Alcoholism Female 15-29 0
236354 UTTARAKHAND 2012 By Over Alcoholism Female 60+ 0
236358 UTTARAKHAND 2012 Retired Person Female 45-59 0
236571 WEST BENGAL 2012 Fall in Social Reputation Female 0-14 0
236575 WEST BENGAL 2012 By touching electric wires Female 0-14 0

9852 rows × 6 columns

In [3630]:
fm2012_count = female_2012.loc[:,"Total"]
s12_3 = np.sum(fm2012_count)
s12_3
Out[3630]:
222398
In [3631]:
df_age_d014_2012 = df_2012.loc[(df_2012["Age_group"]=="0-14")]

df_age_d014_2012
Out[3631]:
State Year Type Gender Age_group Total
2784 A & N ISLANDS 2012 Failure in Examination Female 0-14 0
2785 A & N ISLANDS 2012 Failure in Examination Male 0-14 0
3829 A & N ISLANDS 2012 Dowry Dispute Male 0-14 0
3831 A & N ISLANDS 2012 Ideological Causes/Hero Worshipping Male 0-14 0
4941 A & N ISLANDS 2012 Causes Not known Female 0-14 0
... ... ... ... ... ... ...
236571 WEST BENGAL 2012 Fall in Social Reputation Female 0-14 0
236573 WEST BENGAL 2012 Insanity/Mental Illness Male 0-14 0
236574 WEST BENGAL 2012 By coming under running vehicles/trains Male 0-14 1
236575 WEST BENGAL 2012 By touching electric wires Female 0-14 0
236579 WEST BENGAL 2012 Self-employed (Business activity) Male 0-14 0

3753 rows × 6 columns

In [3632]:
t_014_2012 = df_age_d014_2012.loc[:,"Total"]

s12_4 = np.sum(t_014_2012)
s12_4
Out[3632]:
7363
In [3633]:
df_age_d1529_2012 = df_2012.loc[(df_2012["Age_group"]=="15-29")]

df_age_d1529_2012
Out[3633]:
State Year Type Gender Age_group Total
2792 A & N ISLANDS 2012 By Jumping off Moving Vehicles/Trains Male 15-29 0
4977 A & N ISLANDS 2012 Dowry Dispute Male 15-29 0
4979 A & N ISLANDS 2012 Insanity/Mental Illness Female 15-29 2
4987 A & N ISLANDS 2012 By Jumping off Moving Vehicles/Trains Female 15-29 0
5034 A & N ISLANDS 2012 Insanity/Mental Illness Male 15-29 6
... ... ... ... ... ... ...
236355 UTTARAKHAND 2012 By Overdose of sleeping pills Male 15-29 0
236357 UTTARAKHAND 2012 By Self Infliction of injury Male 15-29 6
236359 UTTARAKHAND 2012 Service (Government) Male 15-29 1
236577 WEST BENGAL 2012 Professional Activity Male 15-29 0
236580 WEST BENGAL 2012 Service (Government) Male 15-29 0

3771 rows × 6 columns

In [3634]:
t_1529_2012 = df_age_d1529_2012.loc[:,"Total"]

s12_5 = np.sum(t_1529_2012)

s12_5
Out[3634]:
130206
In [3635]:
df_age_d3044_2012 = df_2012.loc[(df_2012["Age_group"]=="30-44")]

df_age_d3044_2012
Out[3635]:
State Year Type Gender Age_group Total
2788 A & N ISLANDS 2012 Others Female 30-44 5
2791 A & N ISLANDS 2012 By Fire/Self Immolation Male 30-44 0
2793 A & N ISLANDS 2012 By Jumping off Moving Vehicles/Trains Male 30-44 0
3830 A & N ISLANDS 2012 Family Problems Male 30-44 0
3832 A & N ISLANDS 2012 Illegitimate Pregnancy Male 30-44 0
... ... ... ... ... ... ...
236130 UTTAR PRADESH 2012 Professional Activity Female 30-44 0
236131 UTTAR PRADESH 2012 Self-employed (Business activity) Female 30-44 6
236343 UTTARAKHAND 2012 Cancer Male 30-44 0
236350 UTTARAKHAND 2012 By Consuming Insecticides Male 30-44 0
236352 UTTARAKHAND 2012 By Drowning Male 30-44 10

3765 rows × 6 columns

In [3636]:
t_3044_2012 = df_age_d3044_2012.loc[:,"Total"]

s12_6 = np.sum(t_3044_2012)
s12_6
Out[3636]:
127390
In [3637]:
df_age_d4559_2012 = df_2012.loc[(df_2012["Age_group"]=="45-59")]

df_age_d4559_2012
Out[3637]:
State Year Type Gender Age_group Total
2786 A & N ISLANDS 2012 Fall in Social Reputation Female 45-59 0
2794 A & N ISLANDS 2012 By Self Infliction of injury Female 45-59 0
3834 A & N ISLANDS 2012 Poverty Male 45-59 0
4943 A & N ISLANDS 2012 Family Problems Male 45-59 0
4976 A & N ISLANDS 2012 Divorce Female 45-59 0
... ... ... ... ... ... ...
236347 UTTARAKHAND 2012 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
236348 UTTARAKHAND 2012 Property Dispute Female 45-59 0
236358 UTTARAKHAND 2012 Retired Person Female 45-59 0
236572 WEST BENGAL 2012 Fall in Social Reputation Male 45-59 0
236576 WEST BENGAL 2012 By touching electric wires Male 45-59 0

3761 rows × 6 columns

In [3638]:
t_4559_2012 = df_age_d4559_2012.loc[:,"Total"]

s12_7 = np.sum(t_4559_2012)

s12_7
Out[3638]:
79303
In [3639]:
df_age_d60_2012 = df_2012.loc[(df_2012["Age_group"]=="60+")]

df_age_d60_2012
Out[3639]:
State Year Type Gender Age_group Total
2783 A & N ISLANDS 2012 Divorce Female 60+ 0
2787 A & N ISLANDS 2012 Not having Children(Barrenness/Impotency Male 60+ 0
2789 A & N ISLANDS 2012 Suspected/Illicit Relation Female 60+ 0
2790 A & N ISLANDS 2012 By Consuming Insecticides Male 60+ 1
4981 A & N ISLANDS 2012 Unemployment Female 60+ 0
... ... ... ... ... ... ...
236351 UTTARAKHAND 2012 By Consuming Insecticides Male 60+ 0
236354 UTTARAKHAND 2012 By Over Alcoholism Female 60+ 0
236356 UTTARAKHAND 2012 By Overdose of sleeping pills Male 60+ 0
236578 WEST BENGAL 2012 Professional Activity Male 60+ 0
236581 WEST BENGAL 2012 Service (Government) Male 60+ 0

3761 rows × 6 columns

In [3640]:
t_60_2012 = df_age_d60_2012.loc[:,"Total"]

s12_8 = np.sum(t_60_2012)
s12_8
Out[3640]:
32136
In [3641]:
df_age_d0100_2012 = df_2012.loc[(df_2012["Age_group"]=="0-100+")]

df_age_d0100_2012
Out[3641]:
State Year Type Gender Age_group Total
5037 A & N ISLANDS 2012 Graduate Female 0-100+ 0
5038 A & N ISLANDS 2012 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 1
5039 A & N ISLANDS 2012 Matriculate/Secondary Male 0-100+ 21
5210 A & N ISLANDS 2012 Matriculate/Secondary Female 0-100+ 13
5516 A & N ISLANDS 2012 No Education Male 0-100+ 0
... ... ... ... ... ... ...
235506 SIKKIM 2012 Primary Male 0-100+ 25
235931 TRIPURA 2012 Seperated Female 0-100+ 14
236135 UTTAR PRADESH 2012 Married Male 0-100+ 1546
236349 UTTARAKHAND 2012 Post Graduate and Above Male 0-100+ 0
236582 WEST BENGAL 2012 Never Married Male 0-100+ 2658

910 rows × 6 columns

In [3642]:
t_0100_2012 = df_age_d0100_2012.loc[:,"Total"]

s12_54 = np.sum(t_0100_2012)
s12_54
Out[3642]:
270890
In [3643]:
df_014m_2012 = df_age_d014_2012.loc[(df_age_d014_2012["Gender"]=="Male")]
df_014m_2012
Out[3643]:
State Year Type Gender Age_group Total
2785 A & N ISLANDS 2012 Failure in Examination Male 0-14 0
3829 A & N ISLANDS 2012 Dowry Dispute Male 0-14 0
3831 A & N ISLANDS 2012 Ideological Causes/Hero Worshipping Male 0-14 0
4984 A & N ISLANDS 2012 By Consuming Insecticides Male 0-14 0
4986 A & N ISLANDS 2012 By Drowning Male 0-14 0
... ... ... ... ... ... ...
235722 TAMIL NADU 2012 Others Male 0-14 2
235924 TRIPURA 2012 By Drowning Male 0-14 1
236573 WEST BENGAL 2012 Insanity/Mental Illness Male 0-14 0
236574 WEST BENGAL 2012 By coming under running vehicles/trains Male 0-14 1
236579 WEST BENGAL 2012 Self-employed (Business activity) Male 0-14 0

1876 rows × 6 columns

In [3644]:
t_014m_2012 = df_014m_2012.loc[:,"Total"]

s12_9 = np.sum(t_014m_2012)
s12_9
Out[3644]:
3590
In [3645]:
df_014fm_2012 = df_age_d014_2012.loc[(df_age_d014_2012["Gender"]=="Female")]
df_014fm_2012
Out[3645]:
State Year Type Gender Age_group Total
2784 A & N ISLANDS 2012 Failure in Examination Female 0-14 0
4941 A & N ISLANDS 2012 Causes Not known Female 0-14 0
4942 A & N ISLANDS 2012 Dowry Dispute Female 0-14 0
4944 A & N ISLANDS 2012 Ideological Causes/Hero Worshipping Female 0-14 0
4945 A & N ISLANDS 2012 Love Affairs Female 0-14 0
... ... ... ... ... ... ...
235717 TAMIL NADU 2012 Professional/Career Problem Female 0-14 1
235930 TRIPURA 2012 Unemployed Female 0-14 0
236128 UTTAR PRADESH 2012 House Wife Female 0-14 7
236571 WEST BENGAL 2012 Fall in Social Reputation Female 0-14 0
236575 WEST BENGAL 2012 By touching electric wires Female 0-14 0

1877 rows × 6 columns

In [3646]:
t_014fm_2012 = df_014fm_2012.loc[:,"Total"]

s12_10 = np.sum(t_014fm_2012)
s12_10
Out[3646]:
3773
In [3647]:
df_1529m_2012 = df_age_d1529_2012.loc[(df_age_d1529_2012["Gender"]=="Male")]
df_1529m_2012
Out[3647]:
State Year Type Gender Age_group Total
2792 A & N ISLANDS 2012 By Jumping off Moving Vehicles/Trains Male 15-29 0
4977 A & N ISLANDS 2012 Dowry Dispute Male 15-29 0
5034 A & N ISLANDS 2012 Insanity/Mental Illness Male 15-29 6
5211 A & N ISLANDS 2012 By Consuming Other Poison Male 15-29 2
5417 A & N ISLANDS 2012 Illness (Aids/STD) Male 15-29 0
... ... ... ... ... ... ...
236355 UTTARAKHAND 2012 By Overdose of sleeping pills Male 15-29 0
236357 UTTARAKHAND 2012 By Self Infliction of injury Male 15-29 6
236359 UTTARAKHAND 2012 Service (Government) Male 15-29 1
236577 WEST BENGAL 2012 Professional Activity Male 15-29 0
236580 WEST BENGAL 2012 Service (Government) Male 15-29 0

1886 rows × 6 columns

In [3648]:
t_1529m_2012 = df_1529m_2012.loc[:,"Total"]

s12_11 = np.sum(t_1529m_2012)
s12_11
Out[3648]:
72726
In [3649]:
df_1529fm_2012 = df_age_d1529_2012.loc[(df_age_d1529_2012["Gender"]=="Female")]
df_1529fm_2012
Out[3649]:
State Year Type Gender Age_group Total
4979 A & N ISLANDS 2012 Insanity/Mental Illness Female 15-29 2
4987 A & N ISLANDS 2012 By Jumping off Moving Vehicles/Trains Female 15-29 0
5040 A & N ISLANDS 2012 By Drowning Female 15-29 2
5209 A & N ISLANDS 2012 Property Dispute Female 15-29 0
5440 A & N ISLANDS 2012 Drug Abuse/Addiction Female 15-29 0
... ... ... ... ... ... ...
235926 TRIPURA 2012 By Jumping from (Other sites) Female 15-29 0
236121 UTTAR PRADESH 2012 By Consuming Other Poison Female 15-29 112
236122 UTTAR PRADESH 2012 By Drowning Female 15-29 53
236133 UTTAR PRADESH 2012 Student Female 15-29 104
236353 UTTARAKHAND 2012 By Over Alcoholism Female 15-29 0

1885 rows × 6 columns

In [3650]:
t_1529fm_2012 = df_1529fm_2012.loc[:,"Total"]

s12_12 = np.sum(t_1529fm_2012)
s12_12
Out[3650]:
57480
In [3651]:
df_3044m_2012 = df_age_d3044_2012.loc[(df_age_d3044_2012["Gender"]=="Male")]
df_3044m_2012
Out[3651]:
State Year Type Gender Age_group Total
2791 A & N ISLANDS 2012 By Fire/Self Immolation Male 30-44 0
2793 A & N ISLANDS 2012 By Jumping off Moving Vehicles/Trains Male 30-44 0
3830 A & N ISLANDS 2012 Family Problems Male 30-44 0
3832 A & N ISLANDS 2012 Illegitimate Pregnancy Male 30-44 0
3833 A & N ISLANDS 2012 Other Prolonged Illness Male 30-44 6
... ... ... ... ... ... ...
236125 UTTAR PRADESH 2012 By Machine Male 30-44 3
236129 UTTAR PRADESH 2012 Others Male 30-44 118
236343 UTTARAKHAND 2012 Cancer Male 30-44 0
236350 UTTARAKHAND 2012 By Consuming Insecticides Male 30-44 0
236352 UTTARAKHAND 2012 By Drowning Male 30-44 10

1886 rows × 6 columns

In [3652]:
t_3044m_2012 = df_3044m_2012.loc[:,"Total"]

s12_13 = np.sum(t_3044m_2012)
s12_13
Out[3652]:
88676
In [3653]:
df_3044fm_2012 = df_age_d3044_2012.loc[(df_age_d3044_2012["Gender"]=="Female")]
df_3044fm_2012
Out[3653]:
State Year Type Gender Age_group Total
2788 A & N ISLANDS 2012 Others Female 30-44 5
4946 A & N ISLANDS 2012 Not having Children(Barrenness/Impotency Female 30-44 0
4989 A & N ISLANDS 2012 House Wife Female 30-44 11
5215 A & N ISLANDS 2012 Professional Activity Female 30-44 0
5219 A & N ISLANDS 2012 Unemployed Female 30-44 0
... ... ... ... ... ... ...
235713 TAMIL NADU 2012 Ideological Causes/Hero Worshipping Female 30-44 0
235716 TAMIL NADU 2012 Paralysis Female 30-44 10
236116 UTTAR PRADESH 2012 Illegitimate Pregnancy Female 30-44 2
236130 UTTAR PRADESH 2012 Professional Activity Female 30-44 0
236131 UTTAR PRADESH 2012 Self-employed (Business activity) Female 30-44 6

1879 rows × 6 columns

In [3654]:
t_3044fm_2012 = df_3044fm_2012.loc[:,"Total"]

s12_14 = np.sum(t_3044fm_2012)
s12_14
Out[3654]:
38714
In [3655]:
df_4559m_2012 = df_age_d4559_2012.loc[(df_age_d4559_2012["Gender"]=="Male")]
df_4559m_2012
Out[3655]:
State Year Type Gender Age_group Total
3834 A & N ISLANDS 2012 Poverty Male 45-59 0
4943 A & N ISLANDS 2012 Family Problems Male 45-59 0
4978 A & N ISLANDS 2012 Fall in Social Reputation Male 45-59 0
4982 A & N ISLANDS 2012 Unemployment Male 45-59 0
4985 A & N ISLANDS 2012 By Consuming Insecticides Male 45-59 2
... ... ... ... ... ... ...
236118 UTTAR PRADESH 2012 Love Affairs Male 45-59 0
236120 UTTAR PRADESH 2012 Suspected/Illicit Relation Male 45-59 2
236134 UTTAR PRADESH 2012 Student Male 45-59 1
236572 WEST BENGAL 2012 Fall in Social Reputation Male 45-59 0
236576 WEST BENGAL 2012 By touching electric wires Male 45-59 0

1882 rows × 6 columns

In [3656]:
t_4559m_2012 = df_4559m_2012.loc[:,"Total"]

s12_15 = np.sum(t_4559m_2012)
s12_15
Out[3656]:
59611
In [3657]:
df_4559fm_2012 = df_age_d4559_2012.loc[(df_age_d4559_2012["Gender"]=="Female")]
df_4559fm_2012
Out[3657]:
State Year Type Gender Age_group Total
2786 A & N ISLANDS 2012 Fall in Social Reputation Female 45-59 0
2794 A & N ISLANDS 2012 By Self Infliction of injury Female 45-59 0
4976 A & N ISLANDS 2012 Divorce Female 45-59 0
4983 A & N ISLANDS 2012 By coming under running vehicles/trains Female 45-59 0
5033 A & N ISLANDS 2012 Family Problems Female 45-59 0
... ... ... ... ... ... ...
236342 UTTARAKHAND 2012 Cancellation/Non-Settlement of Marriage Female 45-59 0
236346 UTTARAKHAND 2012 Others Female 45-59 0
236347 UTTARAKHAND 2012 Physical Abuse (Rape/Incest Etc.) Female 45-59 0
236348 UTTARAKHAND 2012 Property Dispute Female 45-59 0
236358 UTTARAKHAND 2012 Retired Person Female 45-59 0

1879 rows × 6 columns

In [3658]:
t_4559fm_2012 = df_4559fm_2012.loc[:,"Total"]

s12_16 = np.sum(t_4559fm_2012)
s12_16
Out[3658]:
19692
In [3659]:
df_60m_2012 = df_age_d60_2012.loc[(df_age_d60_2012["Gender"]=="Male")]
df_60m_2012
Out[3659]:
State Year Type Gender Age_group Total
2787 A & N ISLANDS 2012 Not having Children(Barrenness/Impotency Male 60+ 0
2790 A & N ISLANDS 2012 By Consuming Insecticides Male 60+ 1
4990 A & N ISLANDS 2012 Professional Activity Male 60+ 0
4992 A & N ISLANDS 2012 Service (Private) Male 60+ 7
5042 A & N ISLANDS 2012 By Fire-Arms Male 60+ 0
... ... ... ... ... ... ...
236345 UTTARAKHAND 2012 Illness (Aids/STD) Male 60+ 0
236351 UTTARAKHAND 2012 By Consuming Insecticides Male 60+ 0
236356 UTTARAKHAND 2012 By Overdose of sleeping pills Male 60+ 0
236578 WEST BENGAL 2012 Professional Activity Male 60+ 0
236581 WEST BENGAL 2012 Service (Government) Male 60+ 0

1884 rows × 6 columns

In [3660]:
t_60m_2012 = df_60m_2012.loc[:,"Total"]

s12_17 = np.sum(t_60m_2012)
s12_17
Out[3660]:
23381
In [3661]:
df_60fm_2012 = df_age_d60_2012.loc[(df_age_d60_2012["Gender"]=="Female")]
df_60fm_2012
Out[3661]:
State Year Type Gender Age_group Total
2783 A & N ISLANDS 2012 Divorce Female 60+ 0
2789 A & N ISLANDS 2012 Suspected/Illicit Relation Female 60+ 0
4981 A & N ISLANDS 2012 Unemployment Female 60+ 0
5216 A & N ISLANDS 2012 Self-employed (Business activity) Female 60+ 0
5265 A & N ISLANDS 2012 Public Sector Undertaking Female 60+ 0
... ... ... ... ... ... ...
236124 UTTAR PRADESH 2012 By Jumping off Moving Vehicles/Trains Female 60+ 1
236126 UTTAR PRADESH 2012 Others Female 60+ 11
236127 UTTAR PRADESH 2012 Farming/Agriculture Activity Female 60+ 17
236344 UTTARAKHAND 2012 Fall in Social Reputation Female 60+ 0
236354 UTTARAKHAND 2012 By Over Alcoholism Female 60+ 0

1877 rows × 6 columns

In [3662]:
t_60fm_2012 = df_60fm_2012.loc[:,"Total"]

s12_18 = np.sum(t_60fm_2012)
s12_18
Out[3662]:
8755
In [3663]:
df_0100fm_2012 = df_age_d0100_2012.loc[(df_age_d0100_2012["Gender"]=="Female")]
df_0100fm_2012
Out[3663]:
State Year Type Gender Age_group Total
5037 A & N ISLANDS 2012 Graduate Female 0-100+ 0
5210 A & N ISLANDS 2012 Matriculate/Secondary Female 0-100+ 13
5527 A & N ISLANDS 2012 Never Married Female 0-100+ 11
5636 A & N ISLANDS 2012 Post Graduate and Above Female 0-100+ 0
5935 A & N ISLANDS 2012 Diploma Female 0-100+ 0
... ... ... ... ... ... ...
231003 DAMAN & DIU 2012 Diploma Female 0-100+ 0
232357 JAMMU & KASHMIR 2012 Post Graduate and Above Female 0-100+ 0
234257 MIZORAM 2012 No Education Female 0-100+ 2
234880 PUDUCHERRY 2012 Married Female 0-100+ 106
235931 TRIPURA 2012 Seperated Female 0-100+ 14

455 rows × 6 columns

In [3664]:
t_0100fm_2012 = df_0100fm_2012.loc[:,"Total"]

s12_55 = np.sum(t_0100fm_2012)
s12_55
Out[3664]:
93984
In [3665]:
df_0100m_2012 = df_age_d0100_2012.loc[(df_age_d0100_2012["Gender"]=="Male")]
df_0100m_2012
Out[3665]:
State Year Type Gender Age_group Total
5038 A & N ISLANDS 2012 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 1
5039 A & N ISLANDS 2012 Matriculate/Secondary Male 0-100+ 21
5516 A & N ISLANDS 2012 No Education Male 0-100+ 0
5936 A & N ISLANDS 2012 Primary Male 0-100+ 16
5951 A & N ISLANDS 2012 Married Male 0-100+ 52
... ... ... ... ... ... ...
234881 PUDUCHERRY 2012 Widowed/Widower Male 0-100+ 0
235506 SIKKIM 2012 Primary Male 0-100+ 25
236135 UTTAR PRADESH 2012 Married Male 0-100+ 1546
236349 UTTARAKHAND 2012 Post Graduate and Above Male 0-100+ 0
236582 WEST BENGAL 2012 Never Married Male 0-100+ 2658

455 rows × 6 columns

In [3666]:
t_0100m_2012 = df_0100m_2012.loc[:,"Total"]

s12_56 = np.sum(t_0100m_2012)
s12_56
Out[3666]:
176906
In [3667]:
df_st_AN_2012 = df_2012.loc[(df_2012["State"]=="A & N ISLANDS")]

df_st_AN_2012
Out[3667]:
State Year Type Gender Age_group Total
2783 A & N ISLANDS 2012 Divorce Female 60+ 0
2784 A & N ISLANDS 2012 Failure in Examination Female 0-14 0
2785 A & N ISLANDS 2012 Failure in Examination Male 0-14 0
2786 A & N ISLANDS 2012 Fall in Social Reputation Female 45-59 0
2787 A & N ISLANDS 2012 Not having Children(Barrenness/Impotency Male 60+ 0
... ... ... ... ... ... ...
229204 A & N ISLANDS 2012 Others Male 60+ 0
229205 A & N ISLANDS 2012 Service (Government) Female 15-29 1
229206 A & N ISLANDS 2012 Service (Government) Male 45-59 11
229207 A & N ISLANDS 2012 Married Female 0-100+ 30
229208 A & N ISLANDS 2012 Seperated Male 0-100+ 0

559 rows × 6 columns

In [3668]:
t_AN_2012 = df_st_AN_2012.loc[:,"Total"]

s12_19 = np.sum(t_AN_2012)
s12_19
Out[3668]:
605
In [3669]:
df_st_AP_2012 = df_2012.loc[(df_2012["State"]=="ANDHRA PRADESH")]

df_st_AP_2012
Out[3669]:
State Year Type Gender Age_group Total
9432 ANDHRA PRADESH 2012 Cancellation/Non-Settlement of Marriage Female 30-44 11
9433 ANDHRA PRADESH 2012 Not having Children(Barrenness/Impotency Female 0-14 0
9434 ANDHRA PRADESH 2012 Not having Children(Barrenness/Impotency Male 60+ 1
9435 ANDHRA PRADESH 2012 Property Dispute Female 45-59 15
9436 ANDHRA PRADESH 2012 Middle Male 0-100+ 1880
... ... ... ... ... ... ...
229538 ANDHRA PRADESH 2012 Post Graduate and Above Female 0-100+ 19
229539 ANDHRA PRADESH 2012 By Hanging Male 0-14 9
229540 ANDHRA PRADESH 2012 By Jumping from (Building) Male 0-14 0
229541 ANDHRA PRADESH 2012 Public Sector Undertaking Female 30-44 38
229542 ANDHRA PRADESH 2012 Service (Government) Male 45-59 45

566 rows × 6 columns

In [3670]:
t_AP_2012 = df_st_AP_2012.loc[:,"Total"]

s12_20 = np.sum(t_AP_2012)
s12_20
Out[3670]:
71190
In [3671]:
df_st_ARP_2012 = df_2012.loc[(df_2012["State"]=="ARUNACHAL PRADESH")]

df_st_ARP_2012
Out[3671]:
State Year Type Gender Age_group Total
14715 ARUNACHAL PRADESH 2012 Divorce Female 0-14 0
14716 ARUNACHAL PRADESH 2012 Family Problems Female 15-29 0
14717 ARUNACHAL PRADESH 2012 Illness (Aids/STD) Female 15-29 0
14718 ARUNACHAL PRADESH 2012 Love Affairs Male 0-14 0
14719 ARUNACHAL PRADESH 2012 Other Prolonged Illness Female 15-29 0
... ... ... ... ... ... ...
229730 ARUNACHAL PRADESH 2012 By Over Alcoholism Female 45-59 0
229731 ARUNACHAL PRADESH 2012 Service (Government) Female 60+ 0
229732 ARUNACHAL PRADESH 2012 Student Male 15-29 9
229733 ARUNACHAL PRADESH 2012 Unemployed Male 15-29 3
229734 ARUNACHAL PRADESH 2012 Married Male 0-100+ 75

560 rows × 6 columns

In [3672]:
t_ARP_2012 = df_st_ARP_2012.loc[:,"Total"]

s12_21 = np.sum(t_ARP_2012)
s12_21
Out[3672]:
646
In [3673]:
df_st_AS_2012 = df_2012.loc[(df_2012["State"]=="ASSAM")]

df_st_AS_2012
Out[3673]:
State Year Type Gender Age_group Total
19453 ASSAM 2012 Cancellation/Non-Settlement of Marriage Female 0-14 0
19454 ASSAM 2012 Cancer Male 30-44 14
19455 ASSAM 2012 Causes Not known Male 45-59 179
19456 ASSAM 2012 Dowry Dispute Male 45-59 0
19457 ASSAM 2012 Failure in Examination Male 0-14 0
... ... ... ... ... ... ...
229926 ASSAM 2012 Farming/Agriculture Activity Female 60+ 0
229927 ASSAM 2012 Farming/Agriculture Activity Male 30-44 143
229928 ASSAM 2012 Others Male 60+ 4
229929 ASSAM 2012 Professional Activity Male 45-59 24
229930 ASSAM 2012 Divorcee Male 0-100+ 21

566 rows × 6 columns

In [3674]:
t_AS_2012 = df_st_AS_2012.loc[:,"Total"]

s12_22 = np.sum(t_AS_2012)
s12_22
Out[3674]:
16320
In [3675]:
df_st_BH_2012 = df_2012.loc[(df_2012["State"]=="BIHAR")]

df_st_BH_2012
Out[3675]:
State Year Type Gender Age_group Total
27305 BIHAR 2012 Bankruptcy or Sudden change in Economic Female 30-44 0
27306 BIHAR 2012 Cancer Female 30-44 0
27307 BIHAR 2012 Cancer Male 60+ 0
27308 BIHAR 2012 Causes Not known Female 15-29 19
27309 BIHAR 2012 Family Problems Male 0-14 0
... ... ... ... ... ... ...
230170 BIHAR 2012 By Fire/Self Immolation Female 15-29 21
230171 BIHAR 2012 Farming/Agriculture Activity Female 0-14 0
230172 BIHAR 2012 Others Male 0-14 4
230173 BIHAR 2012 Others Male 15-29 16
230174 BIHAR 2012 Unemployed Female 45-59 1

566 rows × 6 columns

In [3676]:
t_BH_2012 = df_st_BH_2012.loc[:,"Total"]

s12_23 = np.sum(t_BH_2012)
s12_23
Out[3676]:
3795
In [3677]:
df_st_CH_2012 = df_2012.loc[(df_2012["State"]=="CHANDIGARH")]

df_st_CH_2012
Out[3677]:
State Year Type Gender Age_group Total
33200 CHANDIGARH 2012 Bankruptcy or Sudden change in Economic Female 45-59 0
33201 CHANDIGARH 2012 Dowry Dispute Male 15-29 0
34503 CHANDIGARH 2012 Cancer Male 60+ 0
34504 CHANDIGARH 2012 Dowry Dispute Female 30-44 0
34505 CHANDIGARH 2012 Family Problems Male 45-59 5
... ... ... ... ... ... ...
230402 CHANDIGARH 2012 By Overdose of sleeping pills Female 45-59 0
230403 CHANDIGARH 2012 By Self Infliction of injury Female 45-59 0
230404 CHANDIGARH 2012 Retired Person Female 0-14 0
230405 CHANDIGARH 2012 Retired Person Male 45-59 0
230406 CHANDIGARH 2012 Student Female 60+ 0

560 rows × 6 columns

In [3678]:
t_CH_2012 = df_st_CH_2012.loc[:,"Total"]

s12_24 = np.sum(t_CH_2012)
s12_24
Out[3678]:
567
In [3679]:
df_st_CT_2012 = df_2012.loc[(df_2012["State"]=="CHHATTISGARH")]

df_st_CT_2012
Out[3679]:
State Year Type Gender Age_group Total
39266 CHHATTISGARH 2012 Not having Children(Barrenness/Impotency Female 30-44 5
39267 CHHATTISGARH 2012 By Consuming Insecticides Female 60+ 18
39346 CHHATTISGARH 2012 Drug Abuse/Addiction Female 45-59 12
40682 CHHATTISGARH 2012 Death of Dear Person Female 15-29 4
40683 CHHATTISGARH 2012 Death of Dear Person Male 15-29 5
... ... ... ... ... ... ...
230598 CHHATTISGARH 2012 By Over Alcoholism Male 0-14 0
230599 CHHATTISGARH 2012 Retired Person Male 45-59 6
230600 CHHATTISGARH 2012 Service (Private) Male 15-29 133
230601 CHHATTISGARH 2012 Student Male 45-59 0
230602 CHHATTISGARH 2012 Divorcee Female 0-100+ 22

566 rows × 6 columns

In [3680]:
t_CT_2012 = df_st_CT_2012.loc[:,"Total"]

s12_25 = np.sum(t_CT_2012)
s12_25
Out[3680]:
28270
In [3681]:
df_st_DN_2012 = df_2012.loc[(df_2012["State"]=="D & N HAVELI")]

df_st_DN_2012
Out[3681]:
State Year Type Gender Age_group Total
46098 D & N HAVELI 2012 Illness (Aids/STD) Male 30-44 0
46099 D & N HAVELI 2012 Other Prolonged Illness Female 0-14 0
46100 D & N HAVELI 2012 Paralysis Male 45-59 1
46101 D & N HAVELI 2012 Poverty Male 60+ 0
46102 D & N HAVELI 2012 Hr. Secondary/Intermediate/Pre-Universit Male 0-100+ 3
... ... ... ... ... ... ...
230818 D & N HAVELI 2012 By Self Infliction of injury Female 15-29 0
230819 D & N HAVELI 2012 By Self Infliction of injury Female 60+ 0
230820 D & N HAVELI 2012 Retired Person Male 60+ 0
230821 D & N HAVELI 2012 Unemployed Male 15-29 1
230822 D & N HAVELI 2012 Never Married Female 0-100+ 8

559 rows × 6 columns

In [3682]:
t_DN_2012 = df_st_DN_2012.loc[:,"Total"]

s12_26 = np.sum(t_DN_2012)
s12_26
Out[3682]:
330
In [3683]:
df_st_DD_2012 = df_2012.loc[(df_2012["State"]=="DAMAN & DIU")]

df_st_DD_2012
Out[3683]:
State Year Type Gender Age_group Total
52743 DAMAN & DIU 2012 Cancer Male 45-59 0
52744 DAMAN & DIU 2012 Death of Dear Person Male 30-44 0
52745 DAMAN & DIU 2012 Divorce Male 15-29 0
52746 DAMAN & DIU 2012 Drug Abuse/Addiction Female 45-59 0
52747 DAMAN & DIU 2012 Fall in Social Reputation Male 15-29 0
... ... ... ... ... ... ...
231006 DAMAN & DIU 2012 Others Female 15-29 0
231007 DAMAN & DIU 2012 Self-employed (Business activity) Female 30-44 0
231008 DAMAN & DIU 2012 Student Female 0-14 1
231009 DAMAN & DIU 2012 Student Male 30-44 0
231010 DAMAN & DIU 2012 Married Male 0-100+ 6

560 rows × 6 columns

In [3684]:
t_DD_2012 = df_st_DD_2012.loc[:,"Total"]

s12_27 = np.sum(t_DD_2012)
s12_27
Out[3684]:
180
In [3685]:
df_st_DL_2012 = df_2012.loc[(df_2012["State"]=="DELHI (UT)")]

df_st_DL_2012
Out[3685]:
State Year Type Gender Age_group Total
58131 DELHI (UT) 2012 Causes Not known Female 30-44 52
58132 DELHI (UT) 2012 Divorce Male 0-14 0
58133 DELHI (UT) 2012 Dowry Dispute Female 0-14 0
58134 DELHI (UT) 2012 Ideological Causes/Hero Worshipping Female 0-14 0
58249 DELHI (UT) 2012 Cancer Male 60+ 0
... ... ... ... ... ... ...
231262 DELHI (UT) 2012 Professional Activity Male 15-29 3
231263 DELHI (UT) 2012 Professional Activity Male 60+ 0
231264 DELHI (UT) 2012 Self-employed (Business activity) Male 0-14 0
231265 DELHI (UT) 2012 Service (Government) Male 60+ 0
231266 DELHI (UT) 2012 Service (Private) Male 30-44 107

565 rows × 6 columns

In [3686]:
t_DL_2012 = df_st_DL_2012.loc[:,"Total"]

s12_28 = np.sum(t_DL_2012)
s12_28
Out[3686]:
9494
In [3687]:
df_st_GOA_2012 = df_2012.loc[(df_2012["State"]=="GOA")]

df_st_GOA_2012
Out[3687]:
State Year Type Gender Age_group Total
63193 GOA 2012 Cancellation/Non-Settlement of Marriage Female 60+ 0
63194 GOA 2012 Cancer Female 60+ 0
63195 GOA 2012 Cancer Male 60+ 1
63196 GOA 2012 Death of Dear Person Male 45-59 0
63197 GOA 2012 Divorce Female 30-44 0
... ... ... ... ... ... ...
231490 GOA 2012 By Over Alcoholism Male 45-59 1
231491 GOA 2012 By Overdose of sleeping pills Male 60+ 0
231492 GOA 2012 House Wife Female 30-44 24
231493 GOA 2012 Others Female 45-59 0
231494 GOA 2012 Service (Government) Male 15-29 1

566 rows × 6 columns

In [3688]:
t_GOA_2012 = df_st_GOA_2012.loc[:,"Total"]

s12_29 = np.sum(t_GOA_2012)
s12_29
Out[3688]:
1445
In [3689]:
df_st_GJ_2012 = df_2012.loc[(df_2012["State"]=="GUJARAT")]

df_st_GJ_2012
Out[3689]:
State Year Type Gender Age_group Total
69932 GUJARAT 2012 Divorce Female 30-44 9
69933 GUJARAT 2012 Dowry Dispute Male 0-14 0
69934 GUJARAT 2012 Ideological Causes/Hero Worshipping Male 0-14 0
69935 GUJARAT 2012 Illegitimate Pregnancy Female 0-14 0
69936 GUJARAT 2012 Illness (Aids/STD) Female 60+ 0
... ... ... ... ... ... ...
231696 GUJARAT 2012 By Jumping from (Other sites) Female 45-59 0
231697 GUJARAT 2012 By Self Infliction of injury Male 15-29 5
231698 GUJARAT 2012 House Wife Male 15-29 0
231699 GUJARAT 2012 Others Female 15-29 60
231700 GUJARAT 2012 Seperated Male 0-100+ 84

566 rows × 6 columns

In [3690]:
t_GJ_2012 = df_st_GJ_2012.loc[:,"Total"]

s12_30 = np.sum(t_GJ_2012)
s12_30
Out[3690]:
35550
In [3691]:
df_st_HR_2012 = df_2012.loc[(df_2012["State"]=="HARYANA")]

df_st_HR_2012
Out[3691]:
State Year Type Gender Age_group Total
76262 HARYANA 2012 Divorce Female 45-59 0
76263 HARYANA 2012 Dowry Dispute Female 30-44 0
76264 HARYANA 2012 Dowry Dispute Male 60+ 0
76265 HARYANA 2012 Drug Abuse/Addiction Male 60+ 2
76266 HARYANA 2012 Illness (Aids/STD) Male 0-14 0
... ... ... ... ... ... ...
231913 HARYANA 2012 By touching electric wires Female 45-59 0
231914 HARYANA 2012 House Wife Male 0-14 0
231915 HARYANA 2012 Professional Activity Female 15-29 0
231916 HARYANA 2012 Service (Government) Male 15-29 15
231917 HARYANA 2012 Married Male 0-100+ 1371

566 rows × 6 columns

In [3692]:
t_HR_2012 = df_st_HR_2012.loc[:,"Total"]

s12_31 = np.sum(t_HR_2012)
s12_31
Out[3692]:
14135
In [3693]:
df_st_HP_2012 = df_2012.loc[(df_2012["State"]=="HIMACHAL PRADESH")]

df_st_HP_2012
Out[3693]:
State Year Type Gender Age_group Total
83774 HIMACHAL PRADESH 2012 Bankruptcy or Sudden change in Economic Male 0-14 0
83775 HIMACHAL PRADESH 2012 Cancellation/Non-Settlement of Marriage Male 45-59 1
83776 HIMACHAL PRADESH 2012 Family Problems Male 0-14 0
83777 HIMACHAL PRADESH 2012 Family Problems Male 15-29 12
83778 HIMACHAL PRADESH 2012 Paralysis Male 60+ 3
... ... ... ... ... ... ...
232135 HIMACHAL PRADESH 2012 Others Male 15-29 0
232136 HIMACHAL PRADESH 2012 Farming/Agriculture Activity Male 0-14 0
232137 HIMACHAL PRADESH 2012 Others Male 45-59 22
232138 HIMACHAL PRADESH 2012 Retired Person Female 15-29 0
232139 HIMACHAL PRADESH 2012 Retired Person Female 60+ 0

565 rows × 6 columns

In [3694]:
t_HP_2012 = df_st_HP_2012.loc[:,"Total"]

s12_32 = np.sum(t_HP_2012)
s12_32
Out[3694]:
2636
In [3695]:
df_st_JK_2012 = df_2012.loc[(df_2012["State"]=="JAMMU & KASHMIR")]

df_st_JK_2012
Out[3695]:
State Year Type Gender Age_group Total
89422 JAMMU & KASHMIR 2012 Drug Abuse/Addiction Female 15-29 0
89423 JAMMU & KASHMIR 2012 Fall in Social Reputation Male 0-14 0
89424 JAMMU & KASHMIR 2012 Ideological Causes/Hero Worshipping Female 15-29 0
89425 JAMMU & KASHMIR 2012 Other Prolonged Illness Male 60+ 5
89426 JAMMU & KASHMIR 2012 Unemployment Female 45-59 0
... ... ... ... ... ... ...
232363 JAMMU & KASHMIR 2012 By Self Infliction of injury Female 15-29 0
232364 JAMMU & KASHMIR 2012 By Self Infliction of injury Female 60+ 0
232365 JAMMU & KASHMIR 2012 Service (Government) Female 15-29 1
232366 JAMMU & KASHMIR 2012 Service (Private) Female 30-44 1
232367 JAMMU & KASHMIR 2012 Student Male 15-29 13

565 rows × 6 columns

In [3696]:
t_JK_2012 = df_st_JK_2012.loc[:,"Total"]

s12_33 = np.sum(t_JK_2012)
s12_33
Out[3696]:
2070
In [3697]:
df_st_JH_2012 = df_2012.loc[(df_2012["State"]=="JHARKHAND")]

df_st_JH_2012
Out[3697]:
State Year Type Gender Age_group Total
94231 JHARKHAND 2012 Death of Dear Person Female 0-14 1
94232 JHARKHAND 2012 Death of Dear Person Male 0-14 0
94233 JHARKHAND 2012 Failure in Examination Female 30-44 7
94234 JHARKHAND 2012 Ideological Causes/Hero Worshipping Female 15-29 0
94235 JHARKHAND 2012 Illegitimate Pregnancy Male 60+ 0
... ... ... ... ... ... ...
232586 JHARKHAND 2012 By Consuming Insecticides Male 60+ 6
232587 JHARKHAND 2012 By Consuming Other Poison Female 60+ 1
232588 JHARKHAND 2012 By Jumping from (Other sites) Female 60+ 0
232589 JHARKHAND 2012 By Over Alcoholism Male 60+ 12
232590 JHARKHAND 2012 Student Female 0-14 12

566 rows × 6 columns

In [3698]:
t_JH_2012 = df_st_JH_2012.loc[:,"Total"]

s12_34 = np.sum(t_JH_2012)
s12_34
Out[3698]:
6595
In [3699]:
df_st_KN_2012 = df_2012.loc[(df_2012["State"]=="KARNATAKA")]

df_st_KN_2012
Out[3699]:
State Year Type Gender Age_group Total
99102 KARNATAKA 2012 Bankruptcy or Sudden change in Economic Male 0-14 0
99103 KARNATAKA 2012 Drug Abuse/Addiction Male 60+ 6
99104 KARNATAKA 2012 Insanity/Mental Illness Female 30-44 58
99105 KARNATAKA 2012 Insanity/Mental Illness Male 45-59 99
99106 KARNATAKA 2012 Other Prolonged Illness Female 60+ 72
... ... ... ... ... ... ...
232752 KARNATAKA 2012 By Hanging Female 45-59 227
232753 KARNATAKA 2012 By Over Alcoholism Male 30-44 27
232754 KARNATAKA 2012 By touching electric wires Female 30-44 3
232755 KARNATAKA 2012 Farming/Agriculture Activity Male 15-29 289
232756 KARNATAKA 2012 Others Female 15-29 201

566 rows × 6 columns

In [3700]:
t_KN_2012 = df_st_KN_2012.loc[:,"Total"]

s12_35 = np.sum(t_KN_2012)
s12_35
Out[3700]:
63765
In [3701]:
df_st_KER_2012 = df_2012.loc[(df_2012["State"]=="KERALA")]

df_st_KER_2012
Out[3701]:
State Year Type Gender Age_group Total
105867 KERALA 2012 Causes Not known Female 30-44 55
105868 KERALA 2012 Dowry Dispute Male 15-29 0
105869 KERALA 2012 Failure in Examination Male 30-44 1
105870 KERALA 2012 Fall in Social Reputation Male 60+ 2
105871 KERALA 2012 Ideological Causes/Hero Worshipping Male 15-29 0
... ... ... ... ... ... ...
232975 KERALA 2012 By touching electric wires Male 60+ 1
232976 KERALA 2012 House Wife Female 30-44 323
232977 KERALA 2012 Self-employed (Business activity) Male 60+ 68
232978 KERALA 2012 Student Male 30-44 0
232979 KERALA 2012 Student Male 60+ 0

565 rows × 6 columns

In [3702]:
t_KER_2012 = df_st_KER_2012.loc[:,"Total"]

s12_36 = np.sum(t_KER_2012)
s12_36
Out[3702]:
42450
In [3703]:
df_st_LD_2012 = df_2012.loc[(df_2012["State"]=="LAKSHADWEEP")]

df_st_LD_2012
Out[3703]:
State Year Type Gender Age_group Total
112198 LAKSHADWEEP 2012 Death of Dear Person Male 15-29 0
112199 LAKSHADWEEP 2012 Insanity/Mental Illness Male 45-59 0
112200 LAKSHADWEEP 2012 Not having Children(Barrenness/Impotency Female 0-14 0
112201 LAKSHADWEEP 2012 Professional/Career Problem Female 60+ 0
112202 LAKSHADWEEP 2012 Professional/Career Problem Male 45-59 0
... ... ... ... ... ... ...
233204 LAKSHADWEEP 2012 By Self Infliction of injury Female 45-59 0
233205 LAKSHADWEEP 2012 Retired Person Female 0-14 0
233206 LAKSHADWEEP 2012 Retired Person Male 45-59 0
233207 LAKSHADWEEP 2012 Student Female 15-29 0
233208 LAKSHADWEEP 2012 Student Female 60+ 0

557 rows × 6 columns

In [3704]:
t_LD_2012 = df_st_LD_2012.loc[:,"Total"]

s12_37 = np.sum(t_LD_2012)
s12_37
Out[3704]:
5
In [3705]:
df_st_MP_2012 = df_2012.loc[(df_2012["State"]=="MADHYA PRADESH")]

df_st_MP_2012
Out[3705]:
State Year Type Gender Age_group Total
117713 MADHYA PRADESH 2012 Cancellation/Non-Settlement of Marriage Female 0-14 0
117714 MADHYA PRADESH 2012 Cancer Female 0-14 0
117715 MADHYA PRADESH 2012 Dowry Dispute Male 15-29 1
117716 MADHYA PRADESH 2012 Fall in Social Reputation Male 15-29 22
118696 MADHYA PRADESH 2012 Cancellation/Non-Settlement of Marriage Male 60+ 0
... ... ... ... ... ... ...
233412 MADHYA PRADESH 2012 By Self Infliction of injury Male 15-29 3
233413 MADHYA PRADESH 2012 By touching electric wires Female 60+ 3
233414 MADHYA PRADESH 2012 Others Female 0-14 33
233415 MADHYA PRADESH 2012 Service (Private) Male 30-44 251
233416 MADHYA PRADESH 2012 Student Female 30-44 2

566 rows × 6 columns

In [3706]:
t_MP_2012 = df_st_MP_2012.loc[:,"Total"]

s12_38 = np.sum(t_MP_2012)
s12_38
Out[3706]:
48875
In [3707]:
df_st_MH_2012 = df_2012.loc[(df_2012["State"]=="MAHARASHTRA")]

df_st_MH_2012
Out[3707]:
State Year Type Gender Age_group Total
123280 MAHARASHTRA 2012 Cancer Male 60+ 9
123281 MAHARASHTRA 2012 Divorce Female 45-59 0
123282 MAHARASHTRA 2012 Divorce Male 30-44 6
123283 MAHARASHTRA 2012 Drug Abuse/Addiction Female 45-59 7
123284 MAHARASHTRA 2012 Drug Abuse/Addiction Male 45-59 453
... ... ... ... ... ... ...
233638 MAHARASHTRA 2012 By Drowning Female 60+ 60
233639 MAHARASHTRA 2012 By Fire/Self Immolation Female 30-44 289
233640 MAHARASHTRA 2012 By Fire-Arms Male 0-14 0
233641 MAHARASHTRA 2012 Professional Activity Male 0-14 0
233642 MAHARASHTRA 2012 Public Sector Undertaking Male 0-14 0

566 rows × 6 columns

In [3708]:
t_MH_2012 = df_st_MH_2012.loc[:,"Total"]

s12_39 = np.sum(t_MH_2012)
s12_39
Out[3708]:
80560
In [3709]:
df_st_MN_2012 = df_2012.loc[(df_2012["State"]=="MANIPUR")]

df_st_MN_2012
Out[3709]:
State Year Type Gender Age_group Total
130145 MANIPUR 2012 Divorce Male 15-29 0
130146 MANIPUR 2012 Divorce Male 30-44 0
130147 MANIPUR 2012 Failure in Examination Male 60+ 0
130148 MANIPUR 2012 Illegitimate Pregnancy Male 0-14 0
130149 MANIPUR 2012 Illness (Aids/STD) Male 60+ 0
... ... ... ... ... ... ...
233838 MANIPUR 2012 Graduate Male 0-100+ 1
233839 MANIPUR 2012 By coming under running vehicles/trains Female 45-59 0
233840 MANIPUR 2012 By Hanging Male 0-14 0
233841 MANIPUR 2012 By Jumping from (Building) Male 0-14 0
233842 MANIPUR 2012 Others Male 30-44 0

559 rows × 6 columns

In [3710]:
t_MN_2012 = df_st_MN_2012.loc[:,"Total"]

s12_40 = np.sum(t_MN_2012)
s12_40
Out[3710]:
205
In [3711]:
df_st_MG_2012 = df_2012.loc[(df_2012["State"]=="MEGHALAYA")]

df_st_MG_2012
Out[3711]:
State Year Type Gender Age_group Total
132965 MEGHALAYA 2012 Bankruptcy or Sudden change in Economic Female 45-59 0
132966 MEGHALAYA 2012 Bankruptcy or Sudden change in Economic Male 30-44 0
132967 MEGHALAYA 2012 Causes Not known Male 0-14 2
132968 MEGHALAYA 2012 Death of Dear Person Male 45-59 0
132969 MEGHALAYA 2012 Not having Children(Barrenness/Impotency Male 45-59 0
... ... ... ... ... ... ...
234020 MEGHALAYA 2012 Suspected/Illicit Relation Male 45-59 0
234021 MEGHALAYA 2012 By coming under running vehicles/trains Female 45-59 0
234022 MEGHALAYA 2012 By Hanging Male 0-14 3
234023 MEGHALAYA 2012 By Jumping from (Building) Male 0-14 0
234024 MEGHALAYA 2012 Others Male 30-44 3

562 rows × 6 columns

In [3712]:
t_MG_2012 = df_st_MG_2012.loc[:,"Total"]

s12_41 = np.sum(t_MG_2012)
s12_41
Out[3712]:
640
In [3713]:
df_st_MZ_2012 = df_2012.loc[(df_2012["State"]=="MIZORAM")]

df_st_MZ_2012
Out[3713]:
State Year Type Gender Age_group Total
140209 MIZORAM 2012 Cancer Female 30-44 0
140210 MIZORAM 2012 Divorce Female 30-44 0
140211 MIZORAM 2012 Dowry Dispute Male 0-14 0
140212 MIZORAM 2012 Failure in Examination Male 60+ 0
140213 MIZORAM 2012 Family Problems Male 60+ 0
... ... ... ... ... ... ...
234263 MIZORAM 2012 House Wife Male 15-29 0
234264 MIZORAM 2012 Public Sector Undertaking Female 15-29 0
234265 MIZORAM 2012 Service (Government) Male 15-29 0
234266 MIZORAM 2012 Service (Private) Female 15-29 4
234267 MIZORAM 2012 Married Male 0-100+ 44

560 rows × 6 columns

In [3714]:
t_MN_2012 = df_st_MN_2012.loc[:,"Total"]

s12_42 = np.sum(t_MN_2012)
s12_42
Out[3714]:
205
In [3715]:
df_st_NG_2012 = df_2012.loc[(df_2012["State"]=="NAGALAND")]

df_st_NG_2012
Out[3715]:
State Year Type Gender Age_group Total
144724 NAGALAND 2012 Failure in Examination Male 15-29 0
144725 NAGALAND 2012 Insanity/Mental Illness Female 30-44 0
144726 NAGALAND 2012 Love Affairs Male 60+ 0
144727 NAGALAND 2012 Others Male 30-44 2
144728 NAGALAND 2012 Physical Abuse (Rape/Incest Etc.) Female 60+ 0
... ... ... ... ... ... ...
234445 NAGALAND 2012 By Jumping off Moving Vehicles/Trains Female 0-14 0
234446 NAGALAND 2012 Farming/Agriculture Activity Female 60+ 0
234447 NAGALAND 2012 Professional Activity Female 45-59 0
234448 NAGALAND 2012 Public Sector Undertaking Female 45-59 0
234449 NAGALAND 2012 Student Male 15-29 2

557 rows × 6 columns

In [3716]:
t_NG_2012 = df_st_NG_2012.loc[:,"Total"]

s12_43 = np.sum(t_NG_2012)
s12_43
Out[3716]:
150
In [3717]:
df_st_OD_2012 = df_2012.loc[(df_2012["State"]=="ODISHA")]

df_st_OD_2012
Out[3717]:
State Year Type Gender Age_group Total
151348 ODISHA 2012 Dowry Dispute Male 60+ 0
151349 ODISHA 2012 Family Problems Male 45-59 133
151350 ODISHA 2012 Illness (Aids/STD) Male 0-14 0
151351 ODISHA 2012 Insanity/Mental Illness Female 60+ 2
151352 ODISHA 2012 Others Male 30-44 273
... ... ... ... ... ... ...
234662 ODISHA 2012 By touching electric wires Female 45-59 0
234663 ODISHA 2012 House Wife Male 0-14 0
234664 ODISHA 2012 Public Sector Undertaking Female 60+ 0
234665 ODISHA 2012 Self-employed (Business activity) Male 60+ 21
234666 ODISHA 2012 Student Female 30-44 26

566 rows × 6 columns

In [3718]:
t_OD_2012 = df_st_OD_2012.loc[:,"Total"]

s12_44 = np.sum(t_OD_2012)
s12_44
Out[3718]:
25135
In [3719]:
df_st_PD_2012 = df_2012.loc[(df_2012["State"]=="PUDUCHERRY")]

df_st_PD_2012
Out[3719]:
State Year Type Gender Age_group Total
155611 PUDUCHERRY 2012 Cancellation/Non-Settlement of Marriage Male 30-44 6
155612 PUDUCHERRY 2012 Cancer Male 45-59 1
155613 PUDUCHERRY 2012 Failure in Examination Female 60+ 0
157798 PUDUCHERRY 2012 Fall in Social Reputation Female 30-44 0
157799 PUDUCHERRY 2012 Ideological Causes/Hero Worshipping Female 45-59 0
... ... ... ... ... ... ...
234877 PUDUCHERRY 2012 Professional Activity Male 15-29 23
234878 PUDUCHERRY 2012 Self-employed (Business activity) Male 15-29 1
234879 PUDUCHERRY 2012 Service (Private) Male 30-44 5
234880 PUDUCHERRY 2012 Married Female 0-100+ 106
234881 PUDUCHERRY 2012 Widowed/Widower Male 0-100+ 0

564 rows × 6 columns

In [3720]:
t_PD_2012 = df_st_PD_2012.loc[:,"Total"]

s12_45 = np.sum(t_PD_2012)
s12_45
Out[3720]:
2705
In [3721]:
df_st_PB_2012 = df_2012.loc[(df_2012["State"]=="PUNJAB")]

df_st_PB_2012
Out[3721]:
State Year Type Gender Age_group Total
162280 PUNJAB 2012 Divorce Male 15-29 0
162281 PUNJAB 2012 Drug Abuse/Addiction Male 60+ 0
162282 PUNJAB 2012 Failure in Examination Male 60+ 0
162283 PUNJAB 2012 Fall in Social Reputation Male 45-59 1
162284 PUNJAB 2012 Illness (Aids/STD) Male 45-59 0
... ... ... ... ... ... ...
235060 PUNJAB 2012 By Self Infliction of injury Male 0-14 0
235061 PUNJAB 2012 By Self Infliction of injury Male 15-29 3
235062 PUNJAB 2012 By touching electric wires Female 60+ 0
235063 PUNJAB 2012 Public Sector Undertaking Female 15-29 4
235064 PUNJAB 2012 Student Female 45-59 0

564 rows × 6 columns

In [3722]:
t_PB_2012 = df_st_PB_2012.loc[:,"Total"]

s12_46 = np.sum(t_PB_2012)
s12_46
Out[3722]:
5150
In [3723]:
df_st_RJ_2012 = df_2012.loc[(df_2012["State"]=="RAJASTHAN")]

df_st_RJ_2012
Out[3723]:
State Year Type Gender Age_group Total
167087 RAJASTHAN 2012 Bankruptcy or Sudden change in Economic Female 15-29 1
167088 RAJASTHAN 2012 Death of Dear Person Male 15-29 1
167089 RAJASTHAN 2012 Divorce Female 0-14 0
167090 RAJASTHAN 2012 Failure in Examination Female 30-44 1
167091 RAJASTHAN 2012 Ideological Causes/Hero Worshipping Female 30-44 2
... ... ... ... ... ... ...
235273 RAJASTHAN 2012 By touching electric wires Male 15-29 24
235274 RAJASTHAN 2012 Farming/Agriculture Activity Female 45-59 4
235275 RAJASTHAN 2012 Retired Person Male 30-44 1
235276 RAJASTHAN 2012 Retired Person Male 45-59 2
235277 RAJASTHAN 2012 Unemployed Male 60+ 8

566 rows × 6 columns

In [3724]:
t_RJ_2012 = df_st_RJ_2012.loc[:,"Total"]

s12_47 = np.sum(t_RJ_2012)
s12_47
Out[3724]:
24105
In [3725]:
df_st_SM_2012 = df_2012.loc[(df_2012["State"]=="SIKKIM")]

df_st_SM_2012
Out[3725]:
State Year Type Gender Age_group Total
173301 SIKKIM 2012 Cancellation/Non-Settlement of Marriage Female 30-44 0
173302 SIKKIM 2012 Ideological Causes/Hero Worshipping Female 30-44 0
173303 SIKKIM 2012 Ideological Causes/Hero Worshipping Male 15-29 0
173304 SIKKIM 2012 Ideological Causes/Hero Worshipping Male 60+ 0
173305 SIKKIM 2012 Others Female 30-44 0
... ... ... ... ... ... ...
235511 SIKKIM 2012 By Jumping from (Building) Female 60+ 0
235512 SIKKIM 2012 House Wife Female 30-44 7
235513 SIKKIM 2012 Professional Activity Male 0-14 0
235514 SIKKIM 2012 Service (Government) Male 0-14 0
235515 SIKKIM 2012 Service (Private) Male 60+ 0

563 rows × 6 columns

In [3726]:
t_SM_2012 = df_st_SM_2012.loc[:,"Total"]

s12_48 = np.sum(t_SM_2012)
s12_48
Out[3726]:
905
In [3727]:
df_st_TN_2012 = df_2012.loc[(df_2012["State"]=="TAMIL NADU")]

df_st_TN_2012
Out[3727]:
State Year Type Gender Age_group Total
177863 TAMIL NADU 2012 Divorce Male 60+ 1
177864 TAMIL NADU 2012 Failure in Examination Female 60+ 0
177865 TAMIL NADU 2012 Illegitimate Pregnancy Female 30-44 8
177866 TAMIL NADU 2012 Not having Children(Barrenness/Impotency Male 15-29 2
179315 TAMIL NADU 2012 Bankruptcy or Sudden change in Economic Female 45-59 2
... ... ... ... ... ... ...
235719 TAMIL NADU 2012 By Jumping from (Building) Female 15-29 4
235720 TAMIL NADU 2012 By Jumping from (Other sites) Female 15-29 12
235721 TAMIL NADU 2012 By Machine Female 45-59 0
235722 TAMIL NADU 2012 Others Male 0-14 2
235723 TAMIL NADU 2012 By touching electric wires Female 15-29 3

566 rows × 6 columns

In [3728]:
t_TN_2012 = df_st_TN_2012.loc[:,"Total"]

s12_49 = np.sum(t_TN_2012)
s12_49
Out[3728]:
84635
In [3729]:
df_st_TP_2012 = df_2012.loc[(df_2012["State"]=="TRIPURA")]

df_st_TP_2012
Out[3729]:
State Year Type Gender Age_group Total
183486 TRIPURA 2012 Divorce Male 15-29 0
183487 TRIPURA 2012 Drug Abuse/Addiction Female 60+ 0
183488 TRIPURA 2012 Family Problems Male 0-14 2
183489 TRIPURA 2012 Illness (Aids/STD) Female 45-59 0
183490 TRIPURA 2012 Insanity/Mental Illness Male 0-14 0
... ... ... ... ... ... ...
235927 TRIPURA 2012 By Jumping from (Other sites) Female 60+ 0
235928 TRIPURA 2012 Farming/Agriculture Activity Male 15-29 5
235929 TRIPURA 2012 House Wife Female 60+ 24
235930 TRIPURA 2012 Unemployed Female 0-14 0
235931 TRIPURA 2012 Seperated Female 0-100+ 14

566 rows × 6 columns

In [3730]:
t_TP_2012 = df_st_TP_2012.loc[:,"Total"]

s12_50 = np.sum(t_TP_2012)
s12_50
Out[3730]:
4220
In [3731]:
df_st_UP_2012 = df_2012.loc[(df_2012["State"]=="UTTAR PRADESH")]

df_st_UP_2012
Out[3731]:
State Year Type Gender Age_group Total
187852 UTTAR PRADESH 2012 Bankruptcy or Sudden change in Economic Female 30-44 1
187853 UTTAR PRADESH 2012 Causes Not known Female 15-29 103
187854 UTTAR PRADESH 2012 Ideological Causes/Hero Worshipping Male 45-59 0
187855 UTTAR PRADESH 2012 Illegitimate Pregnancy Female 0-14 0
187856 UTTAR PRADESH 2012 Paralysis Female 15-29 0
... ... ... ... ... ... ...
236131 UTTAR PRADESH 2012 Self-employed (Business activity) Female 30-44 6
236132 UTTAR PRADESH 2012 Service (Private) Female 45-59 14
236133 UTTAR PRADESH 2012 Student Female 15-29 104
236134 UTTAR PRADESH 2012 Student Male 45-59 1
236135 UTTAR PRADESH 2012 Married Male 0-100+ 1546

565 rows × 6 columns

In [3732]:
t_UP_2012 = df_st_UP_2012.loc[:,"Total"]

s12_51 = np.sum(t_UP_2012)
s12_51
Out[3732]:
22107
In [3733]:
df_st_UK_2012 = df_2012.loc[(df_2012["State"]=="UTTARAKHAND")]

df_st_UK_2012
Out[3733]:
State Year Type Gender Age_group Total
194651 UTTARAKHAND 2012 Bankruptcy or Sudden change in Economic Male 15-29 0
194652 UTTARAKHAND 2012 Drug Abuse/Addiction Male 60+ 0
194653 UTTARAKHAND 2012 Family Problems Male 30-44 17
194654 UTTARAKHAND 2012 Insanity/Mental Illness Female 15-29 0
194655 UTTARAKHAND 2012 Others Female 60+ 0
... ... ... ... ... ... ...
236355 UTTARAKHAND 2012 By Overdose of sleeping pills Male 15-29 0
236356 UTTARAKHAND 2012 By Overdose of sleeping pills Male 60+ 0
236357 UTTARAKHAND 2012 By Self Infliction of injury Male 15-29 6
236358 UTTARAKHAND 2012 Retired Person Female 45-59 0
236359 UTTARAKHAND 2012 Service (Government) Male 15-29 1

566 rows × 6 columns

In [3734]:
t_UK_2012 = df_st_UK_2012.loc[:,"Total"]

s12_52 = np.sum(t_UK_2012)
s12_52
Out[3734]:
2120
In [3735]:
df_st_WB_2012 = df_2012.loc[(df_2012["State"]=="WEST BENGAL")]

df_st_WB_2012
Out[3735]:
State Year Type Gender Age_group Total
200361 WEST BENGAL 2012 Divorce Male 0-14 0
200362 WEST BENGAL 2012 Family Problems Female 30-44 0
200363 WEST BENGAL 2012 No Education Female 0-100+ 1109
200364 WEST BENGAL 2012 By Drowning Male 0-14 37
200365 WEST BENGAL 2012 By Fire/Self Immolation Male 0-14 2
... ... ... ... ... ... ...
236578 WEST BENGAL 2012 Professional Activity Male 60+ 0
236579 WEST BENGAL 2012 Self-employed (Business activity) Male 0-14 0
236580 WEST BENGAL 2012 Service (Government) Male 15-29 0
236581 WEST BENGAL 2012 Service (Government) Male 60+ 0
236582 WEST BENGAL 2012 Never Married Male 0-100+ 2658

556 rows × 6 columns

In [3736]:
t_WB_2012 = df_st_WB_2012.loc[:,"Total"]

s12_53 = np.sum(t_WB_2012)
s12_53
Out[3736]:
44871
In [3737]:
t_ANm_2012 = np.sum(df_st_AN_2012.where(df_st_AN_2012["Gender"]=="Male")["Total"])
t_ANm_2012
Out[3737]:
400.0
In [3738]:
t_ANfm_2012 = np.sum(df_st_AN_2012.where(df_st_AN_2012["Gender"]=="Female")["Total"])
t_ANfm_2012
Out[3738]:
205.0
In [3739]:
t_APm_2012 = np.sum(df_st_AP_2012.where(df_st_AP_2012["Gender"]=="Male")["Total"])
t_APm_2012
Out[3739]:
47635.0
In [3740]:
t_APfm_2012 = np.sum(df_st_AP_2012.where(df_st_AP_2012["Gender"]=="Female")["Total"])
t_APfm_2012
Out[3740]:
23555.0
In [3741]:
t_ARPm_2012 = np.sum(df_st_ARP_2012.where(df_st_ARP_2012["Gender"]=="Male")["Total"])
t_ARPm_2012
Out[3741]:
496.0
In [3742]:
t_ARPfm_2012 = np.sum(df_st_ARP_2012.where(df_st_ARP_2012["Gender"]=="Female")["Total"])
t_ARPfm_2012
Out[3742]:
150.0
In [3743]:
t_ASm_2012 = np.sum(df_st_AS_2012.where(df_st_AS_2012["Gender"]=="Male")["Total"])
t_ASm_2012
Out[3743]:
11960.0
In [3744]:
t_ASfm_2012 = np.sum(df_st_AS_2012.where(df_st_AS_2012["Gender"]=="Female")["Total"])
t_ASfm_2012
Out[3744]:
4360.0
In [3745]:
t_BHm_2012 = np.sum(df_st_BH_2012.where(df_st_BH_2012["Gender"]=="Male")["Total"])
t_BHm_2012
Out[3745]:
2275.0
In [3746]:
t_BHfm_2012 = np.sum(df_st_BH_2012.where(df_st_BH_2012["Gender"]=="Female")["Total"])
t_BHfm_2012
Out[3746]:
1520.0
In [3747]:
t_CHm_2012 = np.sum(df_st_CH_2012.where(df_st_CH_2012["Gender"]=="Male")["Total"])
t_CHm_2012
Out[3747]:
375.0
In [3748]:
t_CHfm_2012 = np.sum(df_st_CH_2012.where(df_st_CH_2012["Gender"]=="Female")["Total"])
t_CHfm_2012
Out[3748]:
192.0
In [3749]:
t_CTm_2012 = np.sum(df_st_CT_2012.where(df_st_CT_2012["Gender"]=="Male")["Total"])
t_CTm_2012
Out[3749]:
20070.0
In [3750]:
t_CTfm_2012 = np.sum(df_st_CT_2012.where(df_st_CT_2012["Gender"]=="Female")["Total"])
t_CTfm_2012
Out[3750]:
8200.0
In [3751]:
t_DNm_2012 = np.sum(df_st_DN_2012.where(df_st_DN_2012["Gender"]=="Male")["Total"])
t_DNm_2012
Out[3751]:
205.0
In [3752]:
t_DNfm_2012 = np.sum(df_st_DN_2012.where(df_st_DN_2012["Gender"]=="Female")["Total"])
t_DNfm_2012
Out[3752]:
125.0
In [3753]:
t_DDm_2012 = np.sum(df_st_DD_2012.where(df_st_DD_2012["Gender"]=="Male")["Total"])
t_DDm_2012
Out[3753]:
125.0
In [3754]:
t_DDfm_2012 = np.sum(df_st_DD_2012.where(df_st_DD_2012["Gender"]=="Female")["Total"])
t_DDfm_2012
Out[3754]:
55.0
In [3755]:
t_DLm_2012 = np.sum(df_st_DL_2012.where(df_st_DL_2012["Gender"]=="Male")["Total"])
t_DLm_2012
Out[3755]:
6230.0
In [3756]:
t_DLfm_2012 = np.sum(df_st_DL_2012.where(df_st_DL_2012["Gender"]=="Female")["Total"])
t_DLfm_2012
Out[3756]:
3264.0
In [3757]:
t_GOAm_2012 = np.sum(df_st_GOA_2012.where(df_st_GOA_2012["Gender"]=="Male")["Total"])
t_GOAm_2012
Out[3757]:
980.0
In [3758]:
t_GOAfm_2012 = np.sum(df_st_GOA_2012.where(df_st_GOA_2012["Gender"]=="Female")["Total"])
t_GOAfm_2012
Out[3758]:
465.0
In [3759]:
t_GJm_2012 = np.sum(df_st_GJ_2012.where(df_st_GJ_2012["Gender"]=="Male")["Total"])
t_GJm_2012
c:\program files\python\python38-32\lib\site-packages\IPython\core\displayhook.py:275: UserWarning: Output cache limit (currently 1000 entries) hit.
Flushing oldest 200 entries.
  warn('Output cache limit (currently {sz} entries) hit.\n'
Out[3759]:
21810.0
In [3760]:
t_GJfm_2012 = np.sum(df_st_GJ_2012.where(df_st_GJ_2012["Gender"]=="Female")["Total"])
t_GJfm_2012
Out[3760]:
13740.0
In [3761]:
t_HRm_2012 = np.sum(df_st_HR_2012.where(df_st_HR_2012["Gender"]=="Male")["Total"])
t_HRm_2012
Out[3761]:
10355.0
In [3762]:
t_HRfm_2012 = np.sum(df_st_HR_2012.where(df_st_HR_2012["Gender"]=="Female")["Total"])
t_HRfm_2012
Out[3762]:
3780.0
In [3763]:
t_HPm_2012 = np.sum(df_st_HP_2012.where(df_st_HP_2012["Gender"]=="Male")["Total"])
t_HPm_2012
Out[3763]:
1770.0
In [3764]:
t_HPfm_2012 = np.sum(df_st_HP_2012.where(df_st_HP_2012["Gender"]=="Female")["Total"])
t_HPfm_2012
Out[3764]:
866.0
In [3765]:
t_JKm_2012 = np.sum(df_st_JK_2012.where(df_st_JK_2012["Gender"]=="Male")["Total"])
t_JKm_2012
Out[3765]:
960.0
In [3766]:
t_JKfm_2012 = np.sum(df_st_JK_2012.where(df_st_JK_2012["Gender"]=="Female")["Total"])
t_JKfm_2012
Out[3766]:
1110.0
In [3767]:
t_JHm_2012 = np.sum(df_st_JH_2012.where(df_st_JH_2012["Gender"]=="Male")["Total"])
t_JHm_2012
Out[3767]:
4190.0
In [3768]:
t_JHfm_2012 = np.sum(df_st_JH_2012.where(df_st_JH_2012["Gender"]=="Female")["Total"])
t_JHfm_2012
Out[3768]:
2405.0
In [3769]:
t_KNm_2012 = np.sum(df_st_KN_2012.where(df_st_KN_2012["Gender"]=="Male")["Total"])
t_KNm_2012
Out[3769]:
42980.0
In [3770]:
t_KNfm_2012 = np.sum(df_st_KN_2012.where(df_st_KN_2012["Gender"]=="Female")["Total"])
t_KNfm_2012
Out[3770]:
20785.0
In [3771]:
t_KERm_2012 = np.sum(df_st_KER_2012.where(df_st_KER_2012["Gender"]=="Male")["Total"])
t_KERm_2012
Out[3771]:
32045.0
In [3772]:
t_KERfm_2012 = np.sum(df_st_KER_2012.where(df_st_KER_2012["Gender"]=="Female")["Total"])
t_KERfm_2012
Out[3772]:
10405.0
In [3831]:
t_LDm_2012 = np.sum(df_st_LD_2012.where(df_st_LD_2012["Gender"]=="Male")["Total"])
t_LDm_2012
Out[3831]:
5.0
In [3832]:
t_LDfm_2012 = np.sum(df_st_LD_2012.where(df_st_LD_2012["Gender"]=="Female")["Total"])
t_LDfm_2012
Out[3832]:
0.0
In [3833]:
t_MPm_2012 = np.sum(df_st_MP_2012.where(df_st_MP_2012["Gender"]=="Male")["Total"])
t_MPm_2012
Out[3833]:
28870.0
In [3834]:
t_MPfm_2012 = np.sum(df_st_MP_2012.where(df_st_MP_2012["Gender"]=="Female")["Total"])
t_MPfm_2012
Out[3834]:
20005.0
In [3835]:
t_MHm_2012 = np.sum(df_st_MH_2012.where(df_st_MH_2012["Gender"]=="Male")["Total"])
t_MHm_2012
Out[3835]:
56520.0
In [3836]:
t_MHfm_2012 = np.sum(df_st_MH_2012.where(df_st_MH_2012["Gender"]=="Female")["Total"])
t_MHfm_2012
Out[3836]:
24040.0
In [3837]:
t_MNm_2012 = np.sum(df_st_MN_2012.where(df_st_MN_2012["Gender"]=="Male")["Total"])
t_MNm_2012
Out[3837]:
115.0
In [3838]:
t_MNfm_2012 = np.sum(df_st_MN_2012.where(df_st_MN_2012["Gender"]=="Female")["Total"])
t_MNfm_2012
Out[3838]:
90.0
In [3839]:
t_MGm_2012 = np.sum(df_st_MG_2012.where(df_st_MG_2012["Gender"]=="Male")["Total"])
t_MGm_2012
Out[3839]:
450.0
In [3840]:
t_MGfm_2012 = np.sum(df_st_MG_2012.where(df_st_MG_2012["Gender"]=="Female")["Total"])
t_MGfm_2012
Out[3840]:
190.0
In [3841]:
t_MZm_2012 = np.sum(df_st_MZ_2012.where(df_st_MZ_2012["Gender"]=="Male")["Total"])
t_MZm_2012
Out[3841]:
777.0
In [3842]:
t_MZfm_2012 = np.sum(df_st_MZ_2012.where(df_st_MZ_2012["Gender"]=="Female")["Total"])
t_MZfm_2012
Out[3842]:
80.0
In [3843]:
t_NGm_2012 = np.sum(df_st_NG_2012.where(df_st_NG_2012["Gender"]=="Male")["Total"])
t_NGm_2012
Out[3843]:
120.0
In [3844]:
t_NGfm_2012 = np.sum(df_st_NG_2012.where(df_st_NG_2012["Gender"]=="Female")["Total"])
t_MGfm_2012
Out[3844]:
190.0
In [3845]:
t_ODm_2012 = np.sum(df_st_OD_2012.where(df_st_OD_2012["Gender"]=="Male")["Total"])
t_ODm_2012
Out[3845]:
14480.0
In [3846]:
t_ODfm_2012 = np.sum(df_st_OD_2012.where(df_st_OD_2012["Gender"]=="Female")["Total"])
t_ODfm_2012
Out[3846]:
10655.0
In [3847]:
t_PDm_2012 = np.sum(df_st_PD_2012.where(df_st_PD_2012["Gender"]=="Male")["Total"])
t_PDm_2012
Out[3847]:
1860.0
In [3848]:
t_PDfm_2012 = np.sum(df_st_PD_2012.where(df_st_PD_2012["Gender"]=="Female")["Total"])
t_PDfm_2012
Out[3848]:
845.0
In [3849]:
t_PBm_2012 = np.sum(df_st_PB_2012.where(df_st_PB_2012["Gender"]=="Male")["Total"])
t_PBm_2012
Out[3849]:
3920.0
In [3850]:
t_PBfm_2012 = np.sum(df_st_PB_2012.where(df_st_PB_2012["Gender"]=="Female")["Total"])
t_PBfm_2012
Out[3850]:
1230.0
In [3851]:
t_RJm_2012 = np.sum(df_st_RJ_2012.where(df_st_RJ_2012["Gender"]=="Male")["Total"])
t_RJm_2012
Out[3851]:
16135.0
In [3852]:
t_RJfm_2012 = np.sum(df_st_RJ_2012.where(df_st_RJ_2012["Gender"]=="Female")["Total"])
t_RJfm_2012
Out[3852]:
7970.0
In [3853]:
t_SMm_2012 = np.sum(df_st_SM_2012.where(df_st_SM_2012["Gender"]=="Male")["Total"])
t_SMm_2012
Out[3853]:
480.0
In [3854]:
t_SMfm_2012 = np.sum(df_st_SM_2012.where(df_st_SM_2012["Gender"]=="Female")["Total"])
t_SMfm_2012
Out[3854]:
425.0
In [3855]:
t_TNm_2012 = np.sum(df_st_TN_2012.where(df_st_TN_2012["Gender"]=="Male")["Total"])
t_TNm_2012
Out[3855]:
53740.0
In [3856]:
t_TNfm_2012 = np.sum(df_st_TN_2012.where(df_st_TN_2012["Gender"]=="Female")["Total"])
t_TNfm_2012
Out[3856]:
30895.0
In [3857]:
t_TPm_2012 = np.sum(df_st_TP_2012.where(df_st_TP_2012["Gender"]=="Male")["Total"])
t_TPm_2012
Out[3857]:
2800.0
In [3858]:
t_TPfm_2012 = np.sum(df_st_TP_2012.where(df_st_TP_2012["Gender"]=="Female")["Total"])
t_TPfm_2012
Out[3858]:
1420.0
In [3859]:
t_UPm_2012 = np.sum(df_st_UP_2012.where(df_st_UP_2012["Gender"]=="Male")["Total"])
t_UPm_2012
Out[3859]:
12472.0
In [3860]:
t_UPfm_2012 = np.sum(df_st_UP_2012.where(df_st_UP_2012["Gender"]=="Female")["Total"])
t_UPfm_2012
Out[3860]:
9635.0
In [3861]:
t_UKm_2012 = np.sum(df_st_UK_2012.where(df_st_UK_2012["Gender"]=="Male")["Total"])
t_UKm_2012
Out[3861]:
1245.0
In [3862]:
t_UKfm_2012 = np.sum(df_st_UK_2012.where(df_st_UK_2012["Gender"]=="Female")["Total"])
t_UKfm_2012
Out[3862]:
875.0
In [3863]:
t_WBm_2012 = np.sum(df_st_WB_2012.where(df_st_WB_2012["Gender"]=="Male")["Total"])
t_WBm_2012
Out[3863]:
26040.0
In [3864]:
t_WBfm_2012 = np.sum(df_st_WB_2012.where(df_st_WB_2012["Gender"]=="Female")["Total"])
t_WBfm_2012
Out[3864]:
18831.0
In [3865]:
l_2012=list(df_2012.loc[:,"Type"].unique())
l_2012.sort()
print(l_2012,end=" ")
['Bankruptcy or Sudden change in Economic', 'By Consuming Insecticides', 'By Consuming Other Poison', 'By Drowning', 'By Fire-Arms', 'By Fire/Self Immolation', 'By Hanging', 'By Jumping from (Building)', 'By Jumping from (Other sites)', 'By Jumping off Moving Vehicles/Trains', 'By Machine', 'By Over Alcoholism', 'By Overdose of sleeping pills', 'By Self Infliction of injury', 'By coming under running vehicles/trains', 'By touching electric wires', 'Cancellation/Non-Settlement of Marriage', 'Cancer', 'Causes Not known', 'Death of Dear Person', 'Diploma', 'Divorce', 'Divorcee', 'Dowry Dispute', 'Drug Abuse/Addiction', 'Failure in Examination', 'Fall in Social Reputation', 'Family Problems', 'Farming/Agriculture Activity', 'Graduate', 'House Wife', 'Hr. Secondary/Intermediate/Pre-Universit', 'Ideological Causes/Hero Worshipping', 'Illegitimate Pregnancy', 'Illness (Aids/STD)', 'Insanity/Mental Illness', 'Love Affairs', 'Married', 'Matriculate/Secondary', 'Middle', 'Never Married', 'No Education', 'Not having Children(Barrenness/Impotency', 'Other Prolonged Illness', 'Others', 'Paralysis', 'Physical Abuse (Rape/Incest Etc.)', 'Post Graduate and Above', 'Poverty', 'Primary', 'Professional Activity', 'Professional/Career Problem', 'Property Dispute', 'Public Sector Undertaking', 'Retired Person', 'Self-employed (Business activity)', 'Seperated', 'Service (Government)', 'Service (Private)', 'Student', 'Suspected/Illicit Relation', 'Unemployed', 'Unemployment', 'Widowed/Widower'] 
In [3866]:
cause_l_2012=[]
for i in l_2012:
    rough= np.sum(df_2012.where(df_2012["Type"]==i)["Total"])
    cause_l_2012.append(rough)

print(cause_l_2012,end=" ")
[2357.0, 19929.0, 19445.0, 7882.0, 450.0, 11438.0, 50062.0, 566.0, 752.0, 620.0, 93.0, 1521.0, 660.0, 596.0, 4259.0, 924.0, 810.0, 587.0, 18176.0, 819.0, 2043.0, 269.0, 1390.0, 1935.0, 4008.0, 2246.0, 981.0, 30792.0, 13754.0, 4572.0, 21904.0, 13089.0, 176.0, 93.0, 525.0, 7769.0, 3849.0, 95264.0, 25967.0, 31205.0, 30557.0, 26641.0, 605.0, 15699.0, 81218.0, 536.0, 281.0, 840.0, 2291.0, 31088.0, 3456.0, 931.0, 1216.0, 2110.0, 833.0, 5706.0, 3283.0, 1666.0, 11273.0, 6654.0, 1018.0, 8927.0, 1731.0, 4951.0] 
In [3867]:
x1_2012 = set(df_2012.loc[:,"State"])
x1_2012
len(x1_2012)
Out[3867]:
35
In [3868]:
cause_df_2012 = pd.DataFrame(cause_l_2012,l_2012)
cause_df_2012.reset_index()
Out[3868]:
index 0
0 Bankruptcy or Sudden change in Economic 2357.0
1 By Consuming Insecticides 19929.0
2 By Consuming Other Poison 19445.0
3 By Drowning 7882.0
4 By Fire-Arms 450.0
... ... ...
59 Student 6654.0
60 Suspected/Illicit Relation 1018.0
61 Unemployed 8927.0
62 Unemployment 1731.0
63 Widowed/Widower 4951.0

64 rows × 2 columns

In [3869]:
cause_df_2012.plot.bar(stacked=True,figsize=(50,20))
plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("Causes",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths due to Different Causes in 2012",fontsize=55)
plt.legend(["Death Count"], prop={"size":30})
Out[3869]:
<matplotlib.legend.Legend at 0x10fb20d0>
In [3870]:
s_2012=list(df_2012.loc[:,"State"].unique())
s_2012.sort()
print(s_2012,end=" ")
['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH', 'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR', 'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA', 'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA', 'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'] 
In [3871]:
state_s_2012 = [s12_19,s12_20,s12_21,s12_22,s12_23,s12_24,s12_25,s12_26,s12_27,s12_28,s12_29,s12_30,s12_31,s12_32,s12_33,s12_34,
           s12_35,s12_36,s12_37,s12_38,s12_39,s12_40,s12_41,s12_42,s12_43,s12_44,s12_45,s12_46,s12_47,s12_48,s12_49,s12_50,
           s12_51,s12_52,s12_53]
print(state_s_2012,end=" ")
[605, 71190, 646, 16320, 3795, 567, 28270, 330, 180, 9494, 1445, 35550, 14135, 2636, 2070, 6595, 63765, 42450, 5, 48875, 80560, 205, 640, 205, 150, 25135, 2705, 5150, 24105, 905, 84635, 4220, 22107, 2120, 44871] 
In [3872]:
state_m_2012=[t_ANm_2012, t_APm_2012, t_ARPm_2012, t_ASm_2012, t_BHm_2012, t_CHm_2012, t_CTm_2012, t_DNm_2012,
             t_DDm_2012, t_DLm_2012, t_GOAm_2012, t_GJm_2012, t_HRm_2012, t_HPm_2012,t_JKm_2012, t_JHm_2012,
             t_KNm_2012, t_KERm_2012, t_LDm_2012,t_MPm_2012,t_MHm_2012,t_MNm_2012,t_MGm_2012,t_MZm_2012,
             t_NGm_2012, t_ODm_2012, t_PDm_2012,t_PBm_2012,t_RJm_2012,t_SMm_2012,t_TNm_2012,t_TPm_2012,
             t_UPm_2012, t_UKm_2012, t_WBm_2012]
print(state_m_2012,end=" ")
[400.0, 47635.0, 496.0, 11960.0, 2275.0, 375.0, 20070.0, 205.0, 125.0, 6230.0, 980.0, 21810.0, 10355.0, 1770.0, 960.0, 4190.0, 42980.0, 32045.0, 5.0, 28870.0, 56520.0, 115.0, 450.0, 777.0, 120.0, 14480.0, 1860.0, 3920.0, 16135.0, 480.0, 53740.0, 2800.0, 12472.0, 1245.0, 26040.0] 
In [3873]:
state_fm_2012=[t_ANfm_2012, t_APfm_2012, t_ARPfm_2012, t_ASfm_2012, t_BHfm_2012, t_CHfm_2012, t_CTfm_2012, t_DNfm_2012,
             t_DDfm_2012, t_DLfm_2012, t_GOAfm_2012, t_GJfm_2012, t_HRfm_2012, t_HPfm_2012,t_JKfm_2012, t_JHfm_2012,
             t_KNfm_2012, t_KERfm_2012, t_LDfm_2012,t_MPfm_2012,t_MHfm_2012,t_MNfm_2012,t_MGfm_2012,t_MZfm_2012,
             t_NGfm_2012, t_ODfm_2012, t_PDfm_2012,t_PBfm_2012,t_RJfm_2012,t_SMfm_2012,t_TNfm_2012,t_TPfm_2012,
             t_UPfm_2012, t_UKfm_2012, t_WBfm_2012]
print(state_fm_2012,end=" ")
[205.0, 23555.0, 150.0, 4360.0, 1520.0, 192.0, 8200.0, 125.0, 55.0, 3264.0, 465.0, 13740.0, 3780.0, 866.0, 1110.0, 2405.0, 20785.0, 10405.0, 0.0, 20005.0, 24040.0, 90.0, 190.0, 80.0, 30.0, 10655.0, 845.0, 1230.0, 7970.0, 425.0, 30895.0, 1420.0, 9635.0, 875.0, 18831.0] 
In [3874]:
df_state_2012 = {
    
    "State":['A & N ISLANDS', 'ANDHRA PRADESH', 'ARUNACHAL PRADESH', 'ASSAM', 'BIHAR', 'CHANDIGARH', 'CHHATTISGARH',
             'D & N HAVELI', 'DAMAN & DIU', 'DELHI (UT)', 'GOA', 'GUJARAT', 'HARYANA', 'HIMACHAL PRADESH', 'JAMMU & KASHMIR',
             'JHARKHAND', 'KARNATAKA', 'KERALA', 'LAKSHADWEEP', 'MADHYA PRADESH', 'MAHARASHTRA', 'MANIPUR', 'MEGHALAYA',
             'MIZORAM', 'NAGALAND', 'ODISHA', 'PUDUCHERRY', 'PUNJAB', 'RAJASTHAN', 'SIKKIM', 'TAMIL NADU', 'TRIPURA',
             'UTTAR PRADESH', 'UTTARAKHAND', 'WEST BENGAL'],
                   
    "Total":[s12_19,s12_20,s12_21,s12_22,s12_23,s12_24,s12_25,s12_26,s12_27,s12_28,s12_29,s12_30,s12_31,s12_32,s12_33,s12_34,
           s12_35,s12_36,s12_37,s12_38,s12_39,s12_40,s12_41,s12_42,s12_43,s12_44,s12_45,s12_46,s12_47,s12_48,s12_49,s12_50,
           s12_51,s12_52,s12_53],
       
    "Male":[t_ANm_2012, t_APm_2012, t_ARPm_2012, t_ASm_2012, t_BHm_2012, t_CHm_2012, t_CTm_2012, t_DNm_2012,
             t_DDm_2012, t_DLm_2012, t_GOAm_2012, t_GJm_2012, t_HRm_2012, t_HPm_2012,t_JKm_2012, t_JHm_2012,
             t_KNm_2012, t_KERm_2012, t_LDm_2012,t_MPm_2012,t_MHm_2012,t_MNm_2012,t_MGm_2012,t_MZm_2012,
             t_NGm_2012, t_ODm_2012, t_PDm_2012,t_PBm_2012,t_RJm_2012,t_SMm_2012,t_TNm_2012,t_TPm_2012,
             t_UPm_2012, t_UKm_2012, t_WBm_2012],
                 
    "Female":[t_ANfm_2012, t_APfm_2012, t_ARPfm_2012, t_ASfm_2012, t_BHfm_2012, t_CHfm_2012, t_CTfm_2012, t_DNfm_2012,
             t_DDfm_2012, t_DLfm_2012, t_GOAfm_2012, t_GJfm_2012, t_HRfm_2012, t_HPfm_2012,t_JKfm_2012, t_JHfm_2012,
             t_KNfm_2012, t_KERfm_2012, t_LDfm_2012,t_MPfm_2012,t_MHfm_2012,t_MNfm_2012,t_MGfm_2012,t_MZfm_2012,
             t_NGfm_2012, t_ODfm_2012, t_PDfm_2012,t_PBfm_2012,t_RJfm_2012,t_SMfm_2012,t_TNfm_2012,t_TPfm_2012,
             t_UPfm_2012, t_UKfm_2012, t_WBfm_2012]
                  

}

df_All_st_2012 = pd.DataFrame(df_state_2012)
df_All_st_2012
Out[3874]:
State Total Male Female
0 A & N ISLANDS 605 400.0 205.0
1 ANDHRA PRADESH 71190 47635.0 23555.0
2 ARUNACHAL PRADESH 646 496.0 150.0
3 ASSAM 16320 11960.0 4360.0
4 BIHAR 3795 2275.0 1520.0
5 CHANDIGARH 567 375.0 192.0
6 CHHATTISGARH 28270 20070.0 8200.0
7 D & N HAVELI 330 205.0 125.0
8 DAMAN & DIU 180 125.0 55.0
9 DELHI (UT) 9494 6230.0 3264.0
10 GOA 1445 980.0 465.0
11 GUJARAT 35550 21810.0 13740.0
12 HARYANA 14135 10355.0 3780.0
13 HIMACHAL PRADESH 2636 1770.0 866.0
14 JAMMU & KASHMIR 2070 960.0 1110.0
15 JHARKHAND 6595 4190.0 2405.0
16 KARNATAKA 63765 42980.0 20785.0
17 KERALA 42450 32045.0 10405.0
18 LAKSHADWEEP 5 5.0 0.0
19 MADHYA PRADESH 48875 28870.0 20005.0
20 MAHARASHTRA 80560 56520.0 24040.0
21 MANIPUR 205 115.0 90.0
22 MEGHALAYA 640 450.0 190.0
23 MIZORAM 205 777.0 80.0
24 NAGALAND 150 120.0 30.0
25 ODISHA 25135 14480.0 10655.0
26 PUDUCHERRY 2705 1860.0 845.0
27 PUNJAB 5150 3920.0 1230.0
28 RAJASTHAN 24105 16135.0 7970.0
29 SIKKIM 905 480.0 425.0
30 TAMIL NADU 84635 53740.0 30895.0
31 TRIPURA 4220 2800.0 1420.0
32 UTTAR PRADESH 22107 12472.0 9635.0
33 UTTARAKHAND 2120 1245.0 875.0
34 WEST BENGAL 44871 26040.0 18831.0
In [3875]:
pivot_2012 = pd.pivot_table(df_All_st_2012, values=None, index='State', columns=None,
                       fill_value=None, margins=False, dropna=True, margins_name='All', observed=False)

pivot_2012
Out[3875]:
Female Male Total
State
A & N ISLANDS 205.0 400.0 605
ANDHRA PRADESH 23555.0 47635.0 71190
ARUNACHAL PRADESH 150.0 496.0 646
ASSAM 4360.0 11960.0 16320
BIHAR 1520.0 2275.0 3795
CHANDIGARH 192.0 375.0 567
CHHATTISGARH 8200.0 20070.0 28270
D & N HAVELI 125.0 205.0 330
DAMAN & DIU 55.0 125.0 180
DELHI (UT) 3264.0 6230.0 9494
GOA 465.0 980.0 1445
GUJARAT 13740.0 21810.0 35550
HARYANA 3780.0 10355.0 14135
HIMACHAL PRADESH 866.0 1770.0 2636
JAMMU & KASHMIR 1110.0 960.0 2070
JHARKHAND 2405.0 4190.0 6595
KARNATAKA 20785.0 42980.0 63765
KERALA 10405.0 32045.0 42450
LAKSHADWEEP 0.0 5.0 5
MADHYA PRADESH 20005.0 28870.0 48875
MAHARASHTRA 24040.0 56520.0 80560
MANIPUR 90.0 115.0 205
MEGHALAYA 190.0 450.0 640
MIZORAM 80.0 777.0 205
NAGALAND 30.0 120.0 150
ODISHA 10655.0 14480.0 25135
PUDUCHERRY 845.0 1860.0 2705
PUNJAB 1230.0 3920.0 5150
RAJASTHAN 7970.0 16135.0 24105
SIKKIM 425.0 480.0 905
TAMIL NADU 30895.0 53740.0 84635
TRIPURA 1420.0 2800.0 4220
UTTAR PRADESH 9635.0 12472.0 22107
UTTARAKHAND 875.0 1245.0 2120
WEST BENGAL 18831.0 26040.0 44871
In [3876]:
pivot_2012.plot(kind='bar',figsize=(60,30))

plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("States",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths of Males And Females In Different State",fontsize=55)
plt.legend(["Female","Male","Total"], prop={"size":30})

plt.show
Out[3876]:
<function matplotlib.pyplot.show(close=None, block=None)>
In [3877]:
cause_l_percent_2012=[]
for i in cause_l_2012:
    p=i/np.sum(cause_l_2012)
    avg_2012_cause=p*100
    cause_l_percent_2012.append(avg_2012_cause)

print(cause_l_percent_2012,end=" ")
[0.36413466648539755, 3.0788458924002917, 3.004072375820346, 1.2176959869486226, 0.0695208315309414, 1.7670650467797948, 7.734115262448864, 0.08744175699225075, 0.11617703402503984, 0.09578425677596371, 0.014367638516394558, 0.23498041057458197, 0.10196388624538072, 0.0920764790943135, 0.6579760477561766, 0.14274944074353302, 0.12513749675569452, 0.09068606246369468, 2.808023630903091, 0.12652791338631336, 0.315624575150474, 0.04155800818182942, 0.21474212406224122, 0.29893957558304807, 0.6191988728355847, 0.3469861947077653, 0.15155541273745227, 4.757078765557217, 2.1248655930590403, 0.7063316483543647, 3.383965097452757, 2.0221292531299824, 0.027190369665434862, 0.014367638516394558, 0.08110763678609831, 1.2002385336975194, 0.5946348456946521, 14.71740554436356, 4.01166096080879, 4.820883439828948, 4.720773442424392, 4.115787717368467, 0.09346689572493233, 2.4253500760094426, 12.547428656177775, 0.08280703489018798, 0.04341189702265452, 0.12977221885775728, 0.35393827786085946, 4.802808023630903, 0.53391998615763, 0.143830875900681, 0.1878607358702772, 0.3259754545117475, 0.1286907837006093, 0.881524143812337, 0.5071930887024014, 0.2573815674012186, 1.7415740752184499, 1.0279813622375202, 0.157271569996663, 1.3791388068371422, 0.2674234652890213, 0.7648836375770909] 
In [3878]:
np.max(cause_l_percent_2012) #Married
Out[3878]:
14.71740554436356
In [3879]:
np.min(cause_l_percent_2012)  #Ideological Causes/Hero Worshipping
Out[3879]:
0.014367638516394558
In [3880]:
state_s_2012_percent=[]
tot=np.sum(state_s_2012)
for i in state_s_2012:
    xy=i/tot
    avg_state_2012=xy*100
    state_s_2012_percent.append(avg_state_2012)

print(state_s_2012_percent,end=" ")
[0.0935611379508719, 11.009284976400943, 0.09990164482026982, 2.5238310270383955, 0.5868835016918328, 0.08768457060850308, 4.3718568097043775, 0.05103334797320285, 0.02783637162174701, 1.4682139565381451, 0.22346420551902463, 5.497683395295034, 2.1859284048521888, 0.407648197749584, 0.3201182736500906, 1.0198937269190085, 9.861034647003878, 6.5647443074620035, 0.0007732325450485281, 7.558348127849363, 12.458322765821885, 0.03170253434698966, 0.0989737657662116, 0.03170253434698966, 0.02319697635145584, 3.8870400039589503, 0.41831880687125367, 0.7964295213999838, 3.727754099678954, 0.1399550906537836, 13.088507290036436, 0.6526082680209577, 3.418770374677562, 0.3278505991005759, 6.9391435057745] 
In [3881]:
np.max(state_s_2012_percent) #Maharashtra
Out[3881]:
13.088507290036436
In [3882]:
np.min(state_s_2012_percent)  #Lakshdweep
Out[3882]:
0.0007732325450485281
In [3883]:
l_age_grp_2012=[s12_4,s12_5,s12_6,s12_7,s12_8,s12_54]
l_age_grp_2012
Out[3883]:
[7363, 130206, 127390, 79303, 32136, 270890]
In [3884]:
l_age_grp_2012_percent=[]
for i in l_age_grp_2012:
    yz=i/s12_1
    avg_2012_age_grp=yz*100
    l_age_grp_2012_percent.append(avg_2012_age_grp)
l_age_grp_2012_percent
Out[3884]:
[1.1375152945829368,
 20.11562086737279,
 19.680574952725834,
 12.251578895329436,
 4.964714315729629,
 41.84999567425937]
In [3885]:
np.max(l_age_grp_2012_percent)  #0-100+
Out[3885]:
41.84999567425937
In [3886]:
np.min(l_age_grp_2012_percent)  #0-14
Out[3886]:
1.1375152945829368
In [3887]:
total_male_percent_2012= (s12_2/s12_1)*100
total_male_percent_2012
Out[3887]:
65.64156913151487
In [3888]:
total_female_percent_2012= (s12_3/s12_1)*100
total_female_percent_2012
Out[3888]:
34.35843086848512

Total death-count yearwise

In [3900]:
dict_yr = {
            "Years":[2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012],
            "Male":[s1_2,s2_2,s3_2,s4_2,s5_2,s6_2,s7_2,s8_2,s9_2,s10_2,s11_2,s12_2],
            "Female":[s1_3,s2_3,s3_3,s4_3,s5_3,s6_3,s7_3,s8_3,s9_3,s10_3,s11_3,s12_3],
            "Total": [s1_1,s2_1,s3_1,s4_1,s5_1,s6_1,s7_1,s8_1,s9_1,s10_1,s11_1,s12_1]
            }

all_df = pd.DataFrame(dict_yr)
all_df
Out[3900]:
Years Male Female Total
0 2001 331563 210877 542440
1 2002 346645 205335 551980
2 2003 351081 203137 554218
3 2004 363236 205113 568349
4 2005 364557 204988 569545
5 2006 378506 212037 590543
6 2007 396455 216664 613119
7 2008 402704 222310 625014
8 2009 407099 228330 635429
9 2010 435897 237029 672926
10 2011 438455 238704 677159
11 2012 424890 222398 647288
In [3901]:
pivot_allyr = pd.pivot_table(all_df, values=None, index="Years", columns=None,
                       fill_value=None, margins=False, dropna=True, margins_name='All', observed=False)

pivot_allyr
Out[3901]:
Female Male Total
Years
2001 210877 331563 542440
2002 205335 346645 551980
2003 203137 351081 554218
2004 205113 363236 568349
2005 204988 364557 569545
2006 212037 378506 590543
2007 216664 396455 613119
2008 222310 402704 625014
2009 228330 407099 635429
2010 237029 435897 672926
2011 238704 438455 677159
2012 222398 424890 647288
In [3905]:
pivot_allyr.plot(kind='bar',figsize=(10,8))
plt.xlabel("Years",fontsize=15)
plt.ylabel("Death Count",fontsize=12)
Out[3905]:
Text(0, 0.5, 'Death Count')

agegrp wise deathcounts

In [3906]:
df_agegrp_allyr = {
                      "Years":[2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012],
                        "0-14":[s1_4,s2_4,s3_4,s4_4,s5_4,s6_4,s7_4,s8_4,s9_4,s10_4,s11_4,s12_4],
                        "15-29":[s1_5,s2_5,s3_5,s4_5,s5_5,s6_5,s7_5,s8_5,s9_5,s10_5,s11_5,s12_5],
                        "30-44":[s1_6,s2_6,s3_6,s4_6,s5_6,s6_6,s7_6,s8_6,s9_6,s10_6,s11_6,s12_6],
                        "45-59":[s1_7,s2_7,s3_7,s4_7,s5_7,s6_7,s7_7,s8_7,s9_7,s10_7,s11_7,s12_7],
                        "60+":[s1_8,s2_8,s3_8,s4_8,s5_8,s6_8,s7_8,s8_8,s9_8,s10_8,s11_8,s12_8],
                        "0-100+":[s1_54,s2_54,s3_54,s4_54,s5_54,s6_54,s7_54,s8_54,s9_54,s10_54,s11_54,s12_54]
                    
                  }
df_all_agegrp_allyr=pd.DataFrame(df_agegrp_allyr)
df_all_agegrp_allyr
Out[3906]:
Years 0-14 15-29 30-44 45-59 60+ 0-100+
0 2001 9010 116655 109344 64737 25682 217012
1 2002 8632 117864 112529 65482 26639 220834
2 2003 7728 119483 111042 66991 27272 221702
3 2004 8733 120407 114872 69400 27543 227394
4 2005 7665 120701 114548 70874 27929 227828
5 2006 7389 126640 122097 70815 27378 236224
6 2007 7410 129477 125475 76699 28784 245274
7 2008 7143 133955 130676 75574 27632 250034
8 2009 8851 131745 130452 79808 30271 254302
9 2010 9390 142867 134534 83618 33319 269198
10 2011 9096 144037 138640 81876 32340 271170
11 2012 7363 130206 127390 79303 32136 270890
In [3896]:
pivot_agegrp_all = pd.pivot_table(df_all_agegrp_allyr, values=None, index='Years', columns=None,
                       fill_value=None, margins=False, dropna=True, margins_name='All', observed=False)

pivot_agegrp_all
Out[3896]:
0-100+ 0-14 15-29 30-44 45-59 60+
Years
2001 217012 9010 116655 109344 64737 25682
2002 220834 8632 117864 112529 65482 26639
2003 221702 7728 119483 111042 66991 27272
2004 227394 8733 120407 114872 69400 27543
2005 227828 7665 120701 114548 70874 27929
2006 236224 7389 126640 122097 70815 27378
2007 245274 7410 129477 125475 76699 28784
2008 250034 7143 133955 130676 75574 27632
2009 254302 8851 131745 130452 79808 30271
2010 269198 9390 142867 134534 83618 33319
2011 271170 9096 144037 138640 81876 32340
2012 270890 7363 130206 127390 79303 32136
In [3898]:
pivot_agegrp_all.plot(kind='bar',figsize=(60,30))

plt.tick_params(axis='y', labelsize=33)
plt.tick_params(axis='x', labelsize=33)
plt.xlabel("Years",fontsize=40)
plt.ylabel("Death Count",fontsize=40)
plt.title("Number of Deaths of Diffrent AgeGroups Year-Wise",fontsize=55)
plt.legend(["0-100+","0-14","15-29","30-44","45-59","60+"], prop={"size":30})

plt.show
Out[3898]:
<function matplotlib.pyplot.show(close=None, block=None)>
In [ ]: